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