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