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