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