#include using namespace std; const int kMAX_H = 10010; int H, A, D; double memo[kMAX_H]; double E(int x) { if (memo[x] >= 0) return memo[x]; if (x >= H) return memo[x] = 0.0; double res; res = min(E(x + A) + 1.0, E(x + D) + 3.0 / 2.0); return memo[x] = res; } void Solve() { fill(memo, memo + kMAX_H, -1.0); cout << E(0) << endl; } int main() { cin >> H >> A >> D; Solve(); return 0; }