A,B=map(int,input().split()) C,D=A|B,A&B print(C+D)