#include<iostream>
#include<cmath>
using namespace std;
void solve(int w, int sti, int counts[], int *ans){
	if( w < 0 ) return ;
	if( w == 0 ){
		int value = 0;
		const int dv[] = {380,550,850};
		const double ar[] = {0.80, 0.85, 0.88};
		for(int i = 0; i < sizeof(dv)/sizeof(*dv); i++){
			value += (counts[i]%(5-i)) * dv[i];
			value += (int)ceil(dv[i] * ( counts[i] - (counts[i]%(5-i)) ) * ar[i]);
		}
		*ans = min(*ans, value);
	}else{
		int dw[] = {200,300,500};
		for(int i = sti; i < sizeof(dw)/sizeof(dw[0]); i++){
			w -= dw[i];
			counts[i]++;
			solve(w, i, counts, ans);
			counts[i]--;
			w += dw[i];
		}
	}
}
int main(void){
	while(true){
		int w, ans = 10000, cnts[3]={0,};

		cin>>w;
		if(w==0)break;

		solve(w, 0, cnts, &ans);
		cout << ans << '\n';
	}
	return 0;
}