#include <iostream>
#include <algorithm>
#include <vector>

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;


int main()
{
	int dp[5001] = {0};
	
	
	rep(i,5001) dp[i] = 1000000;
	
	int p[6] = {200,300,500,1000,1200,1500};
	int v[6] = {380,550,850,380*5*0.8,550*4*0.85,850*3*0.88};

	dp[0] = 0;
	
	rep(i,6)
	{
		rep(j,5001)
		{
			int x = p[i] + j;
			if(x > 5001) break;

			dp[x] = min(dp[x],dp[j]+v[i]);
		}
	}
	

	int n;
	while(cin >> n && n)
	{
		cout << dp[n] << endl;
	}
	return 0;
}