#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];

int main(void){
    rep(i,5001) dp[i]=1<<30;
    dp[0]=0;
    rep(i,6){
        loop(j,w[i],5001){
            dp[j]=min(dp[j-w[i]]+p[i],dp[j]);
        }
    }
    int W;
    while(cin>>W,W){
        cout<<dp[W]<<endl;
    }
}