#include #define rep(i,n) for(int i=0;i ; using pll = pair; const int INF = 1e9; const ll LINF = 1e18; const int MOD = 1000000007; int main(){ ll a,b,c; cin >> a >> b >> c; if(60*a - b < 0){ cout << -1 << endl; }else{ cout << (3600*c + 60 * a - b - 1)/(60 * a - b) << endl; } }