#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(x,y) for(int x = 0;x < (y);x++) #define LLI long long int #define FORR(x,arr) for(auto& x:arr) #define ALL(a) (a.begin()),(a.end()) #define _L(x) cout<<(x)< class UF { public: vector _parent,_rank; UF() { _parent=_rank=vector(um,0); for(int i=0;i_rank[yRoot]) { _parent[xRoot] = yRoot; return yRoot; } if(_rank[xRoot]<_rank[yRoot]) { _parent[yRoot] = xRoot; return xRoot; } if(xRoot != yRoot) { _parent[yRoot] = xRoot; _rank[xRoot]++; return xRoot; } return xRoot; } }; double dp[10001]; int H, A, D; int main() { cin >> H >> A >> D; int onlyNormal = (H % A) == 0 ? H / A : H / A + 1; double minValue = onlyNormal; FOR(i, onlyNormal) { int rest = H - A * i; int minCount = (rest % D) == 0 ? rest / D : rest / D + 1; double val = (double)minCount * 3.0 / 2.0; minValue = min(minValue, val + i); } cout << minValue << endl; return 0; }