#include <iostream>
#include <cstdio>

using namespace std;

int m[6] = {200, 300, 500, 1000, 1200, 1500};

int v[6] = {380, 550, 850, 1520, 1870, 2244};

int main(){
	int n;
	
	int price[10000];
	
	for(int i = 0; i < 10000; i++){
		price[i] = 1 << 30;
	}
	
	for(int i = 0; i < 6; i++){
		price[m[i]] = v[i];
	}
	
	for(int loop = 0; loop < 50; loop++){
		for(int i = 0; i <= 5000; i++){
			for(int j = 0; j < 6; j++){
				if(price[i + m[j]] > price[i] + v[j]){
					price[i + m[j]] = price[i] + v[j];
				}
			}
		}
	}
	
	cin >> n;
	
	while(n != 0){
		
		printf("%d\n", price[n]);
		
		cin >> n;
	}
	
	return 0;
}