#include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define repi(i,a,b) for(int i = (a); i < (b); i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};
int dp[5050];
int main(){
	memset(dp, 0, sizeof(dp));
	rep(i,5050)dp[i]=INF;
	rep(i,20)rep(j,20)rep(k,20){
		int cost =(i*380)-(i/5*380)+(j*550)-(j/4*330)+(k*850)-(k/3*306);
		int w =i*200+j*300+k*500;
		if(w<=5000){
			dp[w]=min(dp[w],cost);
		}
	}
	int n;
	while(cin>>n,n){
		cout <<dp[n]<<endl;
	}
	return 0;
}