a, b, c = map(int, input().split()) a *= 60 c *= 3600 d = a-b if d <= 0: print(-1) else: ans = (c+d-1) // d print(ans)