A, B, C = map(int, input().split()) if B>=60*A: print(-1) else: print((3600*C+60*A-B-1)//(60*A-B))