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