A = int(input()) B = int(input()) O = B//A if O>=1000: print(2) else: print(1)