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

int main(){

	int w, val[50], cnt[6], v;

	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));
	
	fill(val, val+50, 9500);
	fill(cnt, cnt+6, 0);

	for(int cnt_fA=0; cnt_fA<=25; cnt_fA++){
		for(int cnt_fB=0; cnt_fB<=16; cnt_fB++){
			for(int cnt_fC=0; cnt_fC<=10; cnt_fC++){
				for(int cnt_dA=0; cnt_dA<=5; cnt_dA++){
					for(int cnt_dB=0; cnt_dB<=4; cnt_dB++){
						for(int cnt_dC=0; cnt_dC<=3; cnt_dC++){
							w = weight['A']*(cnt_fA + 5*cnt_dA) + weight['B']*(cnt_fB + 4*cnt_dB) + weight['C']*(cnt_fC + 3*cnt_dC);
							if(w <= 5000){
								v = fix['A']*cnt_fA + fix['B']*cnt_fB + fix['C']*cnt_fC + dsc['A']*cnt_dA + dsc['B']*cnt_dB + dsc['C']*cnt_dC;
								val[w/100] = min(val[w/100], v);
							}
						}
					}
				}
			}
		}
	}
	
	while(cin >> w){
		if(w == 0) break;
		cout << val[w / 100] << endl;
	}

	return 0;

}