x, y = map(int, input().split()) print(int(x != y) + 1)