#include #include using namespace std; int main(){ long long a,b,c;cin>>a>>b>>c; if(60*a <= b) cout << -1 << endl; else cout<< 3600*c/(60*a-b) + (3600*c%(60*a-b)?1:0) << endl; }