#include <iostream>
#include <algorithm>
#include <climits>

using namespace std;

int priceA(int amount){
	if(amount % 200 != 0){ return -1; }
	amount /= 200;
	return (amount / 5 * 5) * 380 * 80 / 100 + (amount % 5) * 380;
}
int priceB(int amount){
	if(amount % 300 != 0){ return -1; }
	amount /= 300;
	return (amount / 4 * 4) * 550 * 85 / 100 + (amount % 4) * 550;
}
int priceC(int amount){
	if(amount % 500 != 0){ return -1; }
	amount /= 500;
	return (amount / 3 * 3) * 850 * 88 / 100 + (amount % 3) * 850;
}

int main(){
	while(true){
		int amount;
		cin >> amount;
		if(amount == 0){ break; }
		int price = INT_MAX;
		for(int a = 0; a <= amount; a += 200){
			for(int b = 0; b + a <= amount; b += 300){
				for(int c = 0; c + b + a < amount; c += 500){
					if(a + b + c != amount){ continue; }
					int pa = priceA(a), pb = priceB(b), pc = priceC(c);
					price = min(price, pa + pb + pc);
				}
			}
		}
		cout << price << endl;
	}
	return 0;
}