#include<cstdio>
#include<algorithm>

using namespace std;

int price(int a,int b,int c)
{
	int na=a/200,nb=b/300,nc=c/500;
	int pa=1520*(na/5)+380*(na%5);
	int pb=1870*(nb/4)+550*(nb%4);
	int pc=2244*(nc/3)+850*(nc%3);
	return pa+pb+pc;
}

int main()
{
	int g;
	while(scanf("%d",&g),g){
		int pmin=10000000;
		for(int c=0;c<=g/500*500;c+=500){
			for(int b=0;b+c<=g;b+=300){
				int a=g-(b+c);
				if(a%200==0){
					pmin=min(pmin,price(a,b,c));
				}
			}
		}
		printf("%d\n",pmin);
	}
	return 0;
}