#include <iostream>
#include <vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int  dp[5001];
bool able[5001];

void init(){
	vector<int> item;
	item.push_back(200);
	item.push_back(300);
	item.push_back(500);
	item.push_back(1000);
	item.push_back(1200);
	item.push_back(1500);
	vector<int> price;
	price.push_back(380);
	price.push_back(550);
	price.push_back(850);
	price.push_back(380*5*0.8);
	price.push_back(550*4*0.85);
	price.push_back(850*3*0.88);
	rep(i,5001)dp[i]=(1<<21);
	able[0]=true;
	dp[0]=0;
	for(int k=0;k<item.size();k++){	
		for(int i=0;i+item[k]<=5000;i++){
			able[i+item[k]] = able[i+item[k]] | able[i];
			if(able[i+item[k]]){
				dp[i+item[k]] = min( dp[i+item[k]] , dp[i]+price[k] );
			}
		}
	}
	return;
}

int main(){
	init();
	int n;
	while(cin >> n && n){
		int mi = dp[n];
		for(int i=2200;i<=2800;i+=50){
			mi = min(mi,dp[i]);
		}
		cout << mi << endl;
	}
}	