#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* #include using namespace boost::multiprecision; */ using namespace std; using ll = long long; using ull = unsigned long long; #define REP(i,a,b) for(ll i = a; i < b; ++i) #define PRI(s) std::cout << s << endl #define PRIF(v, n) printf("%."#n"f\n", (double)v) templatevoid mins(A& a, const B& b) { a = min(a, (A)b); }; templatevoid maxs(A& a, const B& b) { a = max(a, (A)b); }; int main() { ll H, A, D; cin >> H >> A >> D; vector dp(H + 1); dp[0] = 0; REP(i, 1, H + 1) { double a = (i - A >= 0 ? 1 + dp[i - A] : 1); double d = (i - D >= 0 ? 1.5 + dp[i - D] : 1.5); dp[i] = min(a,d); } PRIF(dp[H], 12); return 0; }