Ta=int(input()) Tb=int(input()) N_ratio = 200000/5000 if (Tb/Ta)/N_ratio < 5: print(1) else: print(2)