#include #include using namespace std; int main() { int t, s, d; cin >> t >> s >> d; double time = (double) d / s; if (time <= 1.0 * (24 - t)) { cout << fixed << setprecision(10) << time << endl; } else { cout << fixed << setprecision(10) << (double)(d - s * (24 - t)) / (2 * s) + (24 - t) << endl; } return 0; }