# coding: utf-8 # Your code here! g_x,g_y = input().split() if abs(int(g_x)) == abs(int(g_y)): print(1) else: print(2)