#include <iostream>

using namespace std;

int minP = 999999999;
void DFS(int w, int p, int a, int b, int c)
{
	if(w == 0)
	{
		if(minP > p)
		{
			minP = p;
		}
	}
	if(w - 200 >= 0)
	{
		if(a + 1 < 5)
		{
			DFS(w - 200, p + 380, a + 1, b, c);
		}
		else
		{
			DFS(w - 200, p, 0, b, c);
		}
	}
	if(w - 300 >= 0)
	{
		if(b + 1 < 4)
		{
			DFS(w - 300, p + 550, a, b + 1, c);
		}
		else
		{
			DFS(w - 300, p + 220, a, 0, c);
		}
	}
	if(w - 500 >= 0)
	{
		if(c + 1 < 3)
		{
			DFS(w - 500, p + 850, a, b, c + 1);
		}
		else
		{
			DFS(w - 500, p + 544, a, b, 0);
		}
	}
	return;
}

void solve()
{
	int w;
	while(cin >> w, w)
	{
		minP = 999999999;
		DFS(w, 0, 0, 0, 0);
		cout << minP << endl;
	}
}

int main()
{
	solve();
	return(0);
}