#include <stdio.h>
#include <stdint.h>
int is_bit_set(unsigned char reg, int pos) {
// Check if the bit at position 'pos' is set
if (reg & (1 << pos)) {
return 1;
} else {
return 0;
}
}
int main() {
uint8_t reg, pos;
scanf("%hhu %hhu", ®, &pos);
printf("%u", is_bit_set(reg, pos));
return 0;
}