#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair i_i; typedef pair i_ll; typedef pair ll_i; typedef pair d_i; typedef pair ll_ll; typedef pair d_d; struct edge { int u, v; ll w; }; ll MOD = 1000000007; ll _MOD = 1000000009; double EPS = 1e-10; int main() { int H, A, D; cin >> H >> A >> D; vector dp(H + 1, DBL_MAX); dp[0] = 0; for (int h = 1; h <= H; h++) { int ha = max(0, h - A); dp[h] = min(dp[h], dp[ha] + 1); int hd = max(0, h - D); dp[h] = min(dp[h], dp[hd] + 1.5); } printf("%.10f\n", dp[H]); }