import datetime m,d=map(int,input().split()) if int(str(m)+str(d))>=822: print(24) else: print(23)