#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); ll T, S, D; cin >> T >> S >> D; double T2 = double(D) / S, ans = 0; for(int i = 0; i < 10000000; i++){ if(T2 <= 0) break; if((T + i) % 24 <= 18 && (T + i) % 24 + 1 <= 24){ double add = min(1.0, T2); ans += add; } if((T + i) % 24 <= 0 && (T + i) % 24 + 1 <= 6){ double add = min(1.0, T2); ans += add; } T2 -= 1; } cout << fixed << setprecision(15) << double(D) / S << '\n'; }