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