x,y=map(int,input().split()) for m in[2**64-1]*100:x^=x<<23&m;x,y=y,y^x^x>>17^y>>26;print(x+y&m)