from collections import defaultdict,deque import sys,heapq,bisect,math,itertools,string,queue,datetime sys.setrecursionlimit(10**8) INF = float('inf') mod = 10**9+7 eps = 10**-7 def inpl(): return list(map(int, input().split())) def inpls(): return list(input().split()) a,b,c = inpl() a *= 60 c *= 60*60 def check(N): t = a*N p = c+b*N return t >= p if b >= a: print(-1) else: OK = 10**30 NG = 0 while OK - NG > 1: mid = (OK+NG)//2 if check(mid): OK = mid else: NG = mid print(OK)