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