#include <iostream>

using namespace std;

#define loop(i,a,b) for(int i=(a); i<(int)(b); i++)
#define rep(i,b) loop(i,0,b)

int p[6] = {380,550,850,1520,1870,2244};
int w[6] = {200,300,500,1000,1200,1500};

int dp[5001];
const int INF = 1000000;

int main(void){
    int W;
    rep(i,5001) dp[i]=1<<30;
    dp[0]=0;

    rep(i,5001)rep(j,6){
        for(int k=max(0,i-w[j]); k<i; k++){
            dp[i]=min(dp[k]+p[j],dp[i]);
        }
    }
    while(cin>>W,W){
        cout<<dp[W]<<endl;
    }
}