a, b, c = map(int, input().split()) a *= 60 c *= 3600 for i in range(1000000): if a * i >= c + b * i: print(i) break else: print(-1)