#include<iostream>

const int q[3] = { 200, 300, 500 };
const int p[3] = { 380, 550, 850 };
const int b[3] = { 5, 4, 3 };
const double r[3] = { 0.8, 0.85, 0.88 };

int calc( int i, int n )
{
	return n / b[i] * b[i] * p[i] * r[i] + n % b[i] * p[i];
}

int main()
{
	int n;
	while( std::cin >> n, n )
	{
		int ans = 1 << 30;

		for( int a = 0; a <= 25; ++a )
		{
			for( int b = 0; b <= 16; ++b )
			{
				for( int c = 0; c <= 10; ++c )
				{
					int price = calc( 0, a ) + calc( 1, b ) + calc( 2, c );
					int w = a * q[0] + b * q[1] + c * q[2];

					if( w == n )
						ans = std::min( ans, price );
				}
			}
		}

		std::cout << ans << std::endl;
	}

	return 0;
}