#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int f(int a,int b,int c){
	int res=0;
	res+=a/5*5*380*80/100+a%5*380;
	res+=b/4*4*550*85/100+b%4*550;
	res+=c/3*3*850*88/100+c%3*850;
	return res;
}

int main() {
	int n;
	while(n=in()){
		int res=1000000000;
		int a,b,c;
		for(a=0;a<=n/200+1;a++){
			for(b=0;b<=n/300+1;b++){
				for(c=0;c<=n/500+1;c++){
					if(a*200+b*300+c*500>=n){
						chmin(res,f(a,b,c));
//cout<<a<<" "<<b<<" "<<c<<" "<<f(a,b,c)<<endl;
					}
				}
			}
		}
		cout<<res<<endl;
	}
	return 0;
}