from sys import stdin def main(): A, B, C = map(int, input().split()) a = A * 60 c = C * 3600 if a <= B: print(-1) return x = 1 while 1: case1 = a * x case2 = B * x + c if case1 > case2: print(x) break x += 1 input = lambda: stdin.readline() main()