#include #include #include using namespace std; #define INF 100000000 #define YJ 1145141919 #define INF_INT_MAX 2147483647 #define INF_LL_MAX 9223372036854775807 #define EPS 1e-10 #define MOD 1000000007 #define Pi acos(-1) #define LL long long #define ULL unsigned long long #define LD long double #define int long long signed main() { int A, B, C; cin >> A >> B >> C; if(A*60 <= B) { cout << -1 << endl; return 0; } int l = 0, r = 114514191981036; while(r-l > 1) { int mid = (l+r)/2; int a = mid * A * 60; int b = C*3600 + mid * B; if(a >= b) { r = mid; } else { l = mid; } } cout << r << endl; // int diff = A*60 - B; // int c = C*3600/diff; // if(C%diff != 0) { // c++; // } // cout << c << endl; return 0; }