s=list(map(int,input().split())) if s[0]==s[1] or s[0]==-s[1]: print(1) else: print(2)