x,y = input().split(" ") if x == y: print("1") else: print("2")