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