#include <stdio.h>
int toggleFifthBit(int n) {
// Write your code here
int bitPosition = 5;
// XOR with a mask that has 1 at the 5th bit position
return n ^ (1 << bitPosition);
}
int main() {
int n;
scanf("%d", &n);
printf("%d", toggleFifthBit(n));
return 0;
}