def main(): A, C = map(int, input().split()) print(A ^ C) main()