t = 1 while t: x, y = map(int, input().split()) if x == y: print(1) else: print(2) t -= 1