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