#include <iostream>
using namespace std;
int a,b,x,y,u,u1;
int nr_a=0,nr_b=0;
int main(){
cin>>a>>b;
x=a;
y=b;
while(x!=0)
{
u=x%2;
if(u==1)
nr_a++;
x=x/2;
}
while(y!=0)
{
u1=y%2;
if(u1==1)
nr_b++;
y=y/2;
}
if(nr_a>nr_b)
cout<<a;
else
cout<<b;
return 0;
}