#include <stdio.h>
#include <stdint.h>
#include <stdio.h>
#include <stdint.h>
uint32_t extractField(uint32_t reg, int pos, int length) {
// Create a mask with 'length' number of 1s
uint32_t mask = (1u << length) - 1;
// Shift down, then mask
return (reg >> pos) & mask;
}
int main() {
uint32_t reg;
int pos, length;
scanf("%u %d %d", ®, &pos, &length);
printf("%u", extractField(reg, pos, length));
return 0;
}