#include <bits/stdc++.h>
using namespace std;
const int dx[]={0,1,0,-1,1,-1,-1,1};
const int dy[]={-1,0,1,0,1,1,-1,-1};
const int INF = 1<<30;
const int EPS = 1e-8;
#define PB push_back
#define mk make_pair
#define fi first
#define se second
#define ll long long
#define reps(i,j,k) for(int i = (j); i < (k); i++)
#define rep(i,j) reps(i,0,j)
#define MOD 1000000007
typedef pair<int,int> Pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
int main(){
	int dp[5012];
	Pii data[3];
	data[0] = Pii(200,380);
	data[1] = Pii(300,550);
	data[2] = Pii(500,850);

	Pii s[3];
	s[0] = Pii(5,20);
	s[1] = Pii(4,15);
	s[2] = Pii(3,12);

	fill(dp,dp+5012,INF);
	
	dp[0] = 0;

	rep(i,3){
		int sum = 0;
		int cnt = 1;
		for(int j = data[i].fi; j < 5012; j += data[i].fi){
			int tmp = 0;
			sum += data[i].se;
			if(cnt%s[i].fi == 0){
				tmp = sum * (100-s[i].se) / 100;
			}
			else tmp = sum;
			dp[j] = min(dp[j],tmp);
			cnt++;
		}
	}
	int dp2[5012];
	fill(dp2,dp2+5012,INF);
	dp2[0] = 0;

	for(int i = 0; i < 5012; i+=100){
		for(int j = 0; j < 5012; j+=100){
			if(i+j < 5012 && dp2[i] != INF && dp[j] != INF)dp2[i+j] = min(dp2[i+j],dp2[i]+dp[j]);
		}
	}

	int N;
	while(scanf("%d",&N),N){
		printf("%d\n",dp2[N]);
	}
	return 0;
}