#include using lint = long long; void solve() { lint a, b, c; std::cin >> a >> b >> c; auto p = c * 3600, q = a * 60 - b; lint ans; if (q > 0) { ans = (p + q - 1) / q; } else { ans = -1; } std::cout << ans << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }