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