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