#include using namespace std; int main(){ long long A, B, C; cin >> A >> B >> C; if (A <= B * 60){ cout << -1 << endl; } else { cout << C * 3600 / (A - B * 60) << endl; } }