A = int(input()) B = int(input()) if A / (5000 ** 2) == B / (200000 ** 2): print(2) else: print(1)