from datetime import datetime m, d = map(int, input().split()) if datetime(2024, 8, 22) <= datetime(2024, m, d): print(24) else: print(23)