#include <iostream>
#define MAX_P 1000000
using namespace std;
int g;
int minx=0;
/*
void price(int a,int b,int c){
	if(a/5*1520+a%5*380+b/4*1870+b%4*550+c/3*2244+c%3*850<minx)
		minx=a/5*1520+a%5*380+b/4*1870+b%4*550+c/3*2244+c%3*850;
	return; 
}

void shop(int g,int a,int b,int c){
	if(g==0){
		price(a,b,c);
		return;
	}else if(g<0){
		return;
	}
	shop(g-200,a+1,b,c);
	shop(g-300,a,b+1,c);
	shop(g-500,a,b,c+1);
	return;
}

int main(){
	while(1){
		cin >> g;
		if(g==0)break;
		minx=MAX_P;	
		shop(g,0,0,0);
		cout << minx << endl;
	}
	return 0;
}
*/
int main(){
	while(1){
		cin >> g;
		if(g==0)break;
		minx=MAX_P;
		for(int i=0;i<=25;i++){
			for(int j=0;j<17;j++){
				if(i*200+j*300>g)continue;
				for(int k=0;k<=10;k++){
					if(i*200+j*300+k*500>g)continue;
					if(i*200+j*300+k*500==g){
						if(i/5*1520+i%5*380+j/4*1870+j%4*550+k/3*2244+k%3*850<minx)
							minx=i/5*1520+i%5*380+j/4*1870+j%4*550+k/3*2244+k%3*850;
					}
				}
			}
		}
		cout << minx << endl;
	}
}