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