//本题学习下异或操作: x ^ 1
#include <iostream>
using namespace std;
int main(){
int x,i,j;
cin >> x >> i >> j;
int a = (x >> i)&1 , b = (x >> j)&1; //取出二进制下的第i位
if(a == b){
cout << x << endl;
}else{
x = x^(1<<i); //将二进制下的第i位取反:用异或实现
x = x^(1<<j);
cout << x << endl;
}
return 0;
}