#include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;
#define SZ(n)  (int)n.size()
#define dump(x) cerr<<#x<<" = "<<(x)<<endl;
#define debug(x)cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#define MP make_pair
#define PB push_back
const int INF=1<<28;
	int n;
	int dp[50][50][50];
	int ta[]={380,550,850},wa[]={5,4,3};
	
	int dfs(int a,int b,int c){
		//cout<<a<<" "<<b<<" "<<c<<endl;
		if(a*200+b*300+c*500>n)return dp[a][b][c]=INF;
		
		if(dp[a][b][c]!=INF)return dp[a][b][c];	
		if(a*200+b*300+c*500==n){
			int ret=0;
			while(a>=5)a-=5,ret+=(380*5)*0.8;
			ret+=a*380;
			
			while(b>=4)b-=4,ret+=(550*4)*0.85;
			ret+=b*550;
			
			while(c>=3)c-=3,ret+=(850*3)*0.88;
			ret+=c*850;
			
			if(n==a*200+b*300+c*500)dp[a][b][c]=ret;
			return dp[a][b][c]=ret;
		}
		
		int ret=INF;
	ret=min( ret,dfs(a+1,b,c) );
	ret=min( ret,dfs(a,b+1,c) );
	ret=min( ret,dfs(a,b,c+1) );
	
	return dp[a][b][c]=ret;
	}


	int main(){
	while(cin>>n,n){
	for(int i=0;i<50;i++)for(int j=0;j<50;j++)for(int k=0;k<50;k++)dp[i][j][k]=INF;
	cout<<dfs(0,0,0)<<endl;
	}
	return 0;
} 