#coding: utf-8 A = int(input()) B = int(input()) if 5000 // A == 200000//B: print(1) else: print(2)