#include "bits/stdc++.h"
using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back
#define INF 999999999

int main(){
    int n;
    while(cin>>n){
        if(n==0)break;
        
        int dp[10000];
        rep(i,10000)dp[i]=INF;
        dp[0]=0;
        
        for(int i=1;i<=n;i++){
            if(i-200>=0)
                dp[i] = min(dp[i],dp[i-200]+380);
            if(i-300>=0)
                dp[i] = min(dp[i],dp[i-300]+550);
            if(i-500>=0)
                dp[i] = min(dp[i],dp[i-500]+850);
            if(i-1000>=0)
                dp[i] = min(dp[i],dp[i-1000]+1520);
            if(i-1200>=0)
                dp[i] = min(dp[i],dp[i-1200]+1870);
            if(i-1500>=0)
                dp[i] = min(dp[i],dp[i-1500]+2244);
        }
        cout<<dp[n]<<endl;
    }
}