x, y= map(int, input().split()) def move(x, y): if x + y ==0 or x - y == 0: result= 1 else: result= 2 print(result) move(x, y)