#include<stdio.h>
#include<limits.h>
#include<algorithm>
int main(void)
{
	int n,a,b,c,v,i,va,vb,vc;
	int costA[30], costB[30], costC[30];
	for(i=0;i*200<=5000;++i)
		costA[i] = i%5*380 + i/5*1520;
	for(i=0;i*300<=5000;++i)
		costB[i] = i%4*550 + i/4*1870;
	for(i=0;i*500<=5000;++i)
		costC[i] = i%3*850 + i/3*2244;
	while(scanf("%d",&n),n)
	{
		v=INT_MAX;
		for(a=0;(va=a*200)<=n;++a)
		{
			for(b=0;va+(vb=b*300) <= n; ++b)
			{
				for(c=0; va+vb+(vc=c*500) <= n; ++c)
				{
					if(va+vb+vc==n)
						v = std::min(v, costA[a] + costB[b] + costC[c]);
				}
			}
		}
		printf("%d\n", v);
	}
	return 0;
}