A, B, C = [int(i) for i in input().strip().split(' ')] X = C*60**2 / (A*60 - B) X = int(-(-X // 1)) print([-1, X][X > 0])