A, C = map(int, raw_input().split()) print A ^ C