#include using namespace std; using i64 = int64_t; using ui64 = uint64_t; #ifdef LOCAL_DEBUG #define debug(X) std::cerr << X << " " #define debugV(X) std::cerr << #X << " = " << X << ", " #define debugVL(Y) std::cerr << #Y << " = " << Y << '\n' #define debugWL(Z) std::cerr << #Z << '\n' #define debugP() std::cerr << "Line:" << __LINE__ << '\n' #else #define debug(X) #define debugV(X) #define debugVL(Y) #define debugWL(Z) #define debugP() #endif int main() { cout << setprecision(15); int T, iS, iD; cin >> T >> iS >> iD; double S = iS, D = iD; int yoruTime = 0; if(T < 6){ debugP(); while(T < 6){ yoruTime++; T++; } } else if(18 <= T){ debugP(); while(T < 24){ yoruTime++; T++; } T = 0; while(T < 6){ yoruTime++; T++; } } else{ debugP(); while(T < 18){ T++; yoruTime++; } } debugVL(yoruTime); bool isInt = false; int itime = 0; double dtime = 0; if(iD % iS == 0){ debugWL(isInt = true); isInt = true; itime = iD/iS; } else{ dtime = D/S; } debugV(itime); debugVL(dtime); double ans = 0.0; if(isInt){ debugP(); ans = min(yoruTime, itime); } else{ debugP(); ans = min((double)yoruTime, dtime); } cout << ans << endl; }