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