A, B = map(int, input().split()) print(A and not B or not A and B)