#include<iostream>
using namespace std;
void recur(int w, int sti, int counts[], int *ans){
	if( w <= 0 ){
		int value;
		int dv[] = {380,550,850};
		value =
			(counts[0] * dv[0] - int((counts[0] / 5) * (5 * dv[0]) * 0.2)) +
			(counts[1] * dv[1] - int((counts[1] / 4) * (4 * dv[1]) * 0.15)) +
			(counts[2] * dv[2] - int((counts[2] / 3) * (3 * dv[2]) * 0.12));
		*ans = min(*ans, value);
	}else{
		int dw[] = {200,300,500};
		for(int i = sti; i < sizeof(dw)/sizeof(*dw); i++){
			w -= dw[i];
			counts[i]++;
			recur(w, i, counts, ans);
			counts[i]--;
			w += dw[i];
		}
	}
}
int main(void){
	while(true){
		int w, ans = 1<<22, cnts[3]={0,};

		cin>>w;
		if(w==0)break;

		recur(w, 0, cnts, &ans);
		cout << ans << '\n';
	}
	return 0;
}