#include<iostream>
#include<vector>
#include<cfloat>
using namespace std;

struct soba{
	double gram;
	double yen;
	soba(double g, double y){gram=g;yen=y;}
};

double n;
double min_y;
vector<soba> v;


void buy(double sum_g, double sum_y){
	int len = v.size();
	for(int i=0;i < len;i++){
		if(sum_g == n){
			min_y = min(min_y, sum_y);
			return;
		}else if(sum_g > n){
			break;
		}
		buy(sum_g+v[i].gram, sum_y+v[i].yen);
	}
	return;
}


int main(){
	int sum_g, sum_y;
	v.push_back(soba(200,380));
	v.push_back(soba(200*5, (380*5) * 0.8));
	v.push_back(soba(300,550));
	v.push_back(soba(300*4, (550*4) * 0.85));
	v.push_back(soba(500,850));
	v.push_back(soba(500*3, (850*3) * 0.88));
	while(true){
		cin>>n; if(n==0) break;
		min_y = DBL_MAX;
		buy(0,0);
		cout<<int(min_y)<<endl;
	}
	return 0;
}