#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 200000000
#define EQ(a,b) (abs((a)-(b))<EPS)
int w[6]={200,300,500,1000,1200,1500};
int price[6]={380,550,850,1520,1870,2244};
int main()
{
	int dp[6000];
	for(int i=0;i<6000;i++)
	{
		dp[i]=INF;
	}
	dp[0]=0;
	for(int k=0;k<6;k++)
	{
		for(int i=0;i+w[k]<=5000;i++)
		{
			dp[i+w[k]]=min(dp[i+w[k]],dp[i]+price[k]);
		}
	}
	while(1)
	{
		int n;
		cin >> n;
		if(n==0)break;
		cout << dp[n] << endl;
	}
	return 0;
}