#include<iostream>
#include<map>
using namespace std;

int main(){

/*
	cout << "yen/g" << endl;
	cout << "A:" << 380 / 200.0 << ", " << 380 / 200.0 * 0.8 << endl;
	cout << "B:" << 550 / 300.0 << ", " << 550 / 300.0 * 0.85 << endl;
	cout << "C:" << 850 / 500.0 << ", " << 380 / 200.0 * 0.88 << endl;
*/

	int w, val;
	map<char, int> fix, dsc, weight;
	
	weight.insert(make_pair('A', 200));
	weight.insert(make_pair('B', 300));
	weight.insert(make_pair('C', 500));
	
	fix.insert(make_pair('A', 380));
	fix.insert(make_pair('B', 550));
	fix.insert(make_pair('C', 850));
	
	dsc.insert(make_pair('A', 1520));
	dsc.insert(make_pair('B', 1870));
	dsc.insert(make_pair('C', 2244));
	
	while(cin >> w){
		if(w == 0) break;		
		
		val = 0;
		while(w > 1500){
			w -= weight['A'] * 5;
			val += dsc['A'];
		}
		switch(w){
			case 1500: val += dsc['C']; break;
			case 1400: val += dsc['B'] + fix['A']; break;
			case 1300: val += dsc['A'] + fix['B']; break;
			case 1200: val += dsc['B']; break;
			case 1100: val += fix['C'] + fix['B'] * 2; break;
			case 1000: val += dsc['A']; break;
			case 900: val += fix['C'] + fix['A'] * 2; break;
			case 800: val += fix['C'] + fix['B']; break;
			case 700: val += fix['C'] + fix['A']; break;
			case 600: val += fix['B'] * 2; break;
			case 500: val += fix['C']; break;
		}
		
		cout << val << endl;
		
	}

	return 0;

}