from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline H,M = map(int,input().split()) val = 24*60*60*H + 60*M + 30 X = 24*60*60*7 + 60*30 + 0 Y = 24*60*60*8 + 60*30 + 0 if val