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