#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
//A : 190   : 152
//B : 183.3 : 
//C : 170   :
int main(){
    int n;
    while(cin >> n){
        if( !n ) break;
        int ans = 1001001001, temp;

        for(int a=0;a<=n;a+=200){
            for(int b=0;b<=n;b+=300){
                for(int c=0;c<=n;c+=500){
                    if(a+b+c == n){
                        int na = a/200, nb = b/300, nc = c/500;
                        int nna = na/5, nnb = nb/4, nnc = nc/3;
                        int as = nna*380*5*80/100 + (na%5)*380;
                        int bs = nnb*550*4*85/100 + (nb%4)*550;
                        int cs = nnc*850*3*88/100 + (nc%3)*850;
                        temp = as + bs + cs; 
                        ans = min(ans,temp);
                    }
                }
            }
        }

        cout << ans << endl;
    }

    return 0;
}
