a, b, c = map(int,input().split()) if 60*a <= b: print(-1) else: cnt = 1 while True: if cnt*(60*a-b) >= (3600*c): break else: cnt+=1 print(cnt)