a = int(input()) b = int(input()) if b /(a+1) < 40: print(1) else: print(2)