m,d = map(int,input().split()) print(23 if m * 10**9 + d < 8 * 10**9 + 21 else 24)