#include #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REPR(i, n) for(int i = (int)(n); i >= 0; i--) #define FOR(i, s, n) for (int i = (s); i < (int)(n); i++) #define ALL(v) v.begin(), v.iner() using namespace std; typedef long long ll; ll N, K, W, H, M, C, V; const int MAX = 510000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; vector cx, cy, c; ll MM = 1e12; void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++){ fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } long long COM(int n, int k){ if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } std::vector Eratosthenes(int n ){ std::vector is_prime( n + 1 ); for( int i = 0; i <= n; i++ ) is_prime[ i ] = true; std::vector P; for( int i = 2; i <= n; i++ ){ if( is_prime[ i ] ){ for( int j = 2 * i; j <= n; j += i ){ is_prime[ j ] = false; } P.emplace_back( i ); } } return P; } int main(){ ll h,a,d; cin >> h >> a >> d; double ans = h; REP(i, h + 1){ for(int j = h; j >= 0; --j){ if( h - i*a -j*d > 0) break; ans = min(ans, 1.0 * i + 1.5 * j); // cout << 1.0 * i + 1.5 * j << "\n"; } } cout << ans ; return 0; }