#include #include using namespace std; const int inf = 987654321; vector dp; int h, a, d; double nya(int damage) { if(dp[damage] != inf) { return dp[damage]; } if(damage >= h) { return dp[damage] = 0; } double r1 = nya(damage + a) + 1, r2 = nya(damage + d) + 3. / 2; return dp[damage] = min(r1, r2); } int main(void) { scanf("%d%d%d", &h, &a, &d); dp.assign(h+10, inf); double res = nya(0); printf("%lf\n", res); return 0; }