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