#include #include #include #include #include using namespace std; typedef long long ll; int main() { double t, s, d; cin >> t >> s >> d; double time = d / s; //ll day = time / 24; //double answer = day * 12; //time = fmod(time, 24); double answer = 0; while (true) { if (t >= 24) { t = 0; } if (time>=1) { time--; t += 1.0f; if (t<=6||19<=t) { answer++; } } else { //if (t <= 5 || 18 <= t) { answer += time; } break; } } cout << std::setprecision(20) << answer << endl; return 0; }