#include <stdio.h>
// Function to toggle a bit at a given position
unsigned char toggleBit(unsigned char reg, int pos) {
return reg ^ (1 << pos); // Toggle the bit without affecting other bits
}
int main() {
unsigned char reg;
int pos;
scanf("%hhu %d", ®, &pos);
unsigned char updatedReg = toggleBit(reg, pos);
printf("%u\n", updatedReg); // Print the updated register value
return 0;
}