import sys l = list(map(int,input().split())) a, b, c = l[0], l[1], l[2] task = 1 if a * 60 < b: print(-1) sys.exit() while True: hand_time = a * 60 * task code_time = (3600 * c) + (b * task) if code_time < hand_time: print(task) break task += 1