A,B=int(input()),int(input()) if A<=B<=1600*A: print(1) else: print(2)