#include using namespace std; typedef long long ll; int main(){ ll a, b, c; cin >> a >> b >> c; a *= 60; c *= 3600; if(a < b){ printf("-1\n"); return 0; } ll ans = 1; while(a*ans < b*ans+c) ans++; printf("%lld\n", ans); return 0; }