#include<iostream>
#include<cmath>
#include<limits.h>
using namespace std;
int grum[3]={200,300,500};
int val[3]={380,550,850};
double dis[3]={0.8,0.85,0.88};
int dis_c[3]={5,4,3};

int main()
{
	int ans[5001];
	for(int i = 500; i < 5100; i+=100)
	{
		ans[i]=INT_MAX;
		for(int j = 0; j <= 25; ++j)
		{
			for(int k = 0; k <= 17; ++k)
			{
				for(int l = 0; l <= 10 ; ++l)
				{
					if(j*200+k*300+l*500<i)
					{
						continue;
					}
					int tmp=0;
					tmp+=(j-j%5)*380*0.8+j%5*380;
					tmp+=(k-k%4)*550*0.85+k%4*550;
					tmp+=(l-l%3)*850*0.88+l%3*850;
					ans[i]=min(ans[i],tmp);
				}
			}
		}
	}
	int n;
	while(cin>>n,n) 
	{
		cout<<ans[n]<<endl;
	}
  return 0;
}