h,m=map(int,input().split()) hm=h*60+m k=450 d=510 if hm