Gx, Gy = map(int, input().split()) if (Gx + Gy) % 2 == 0: print(1) else: print(2)