a, b, c = [int(_) for _ in input().split()] i = c*3600 / (a*60-b) if i < 0: print(-1) else: print(-(-c*3600 // (a*60-b)))