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

typedef unsigned long long ull;

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

int main(){
    int n;
    while(cin >> n, n){
        int ans = 100000;
        rep(i, 26){
            rep(j, 21){
                rep(k, 11){
                    int cost = i*380 + j*550 + k*850 - (i/5)*5*0.2*380 - (j/4)*4*0.15*550 - (k/3)*3*0.12*850;
                    int weight = i*200 + j*300 + k*500;
                    if(weight == n) ans = min(ans, cost);
                }
            }
        }
        cout << ans << endl;
    }
}