Gx,GY=(abs(x) for x in input().split()) if Gx == Gy: print(1) else: print(2)