a,b = map(int,input().split()) if abs(a) == abs(b): print(1) else: print(2)