import operator A,B = map(int,input().split()) K = operator.__xor__(A,B) print(K)