#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef long long ll;
typedef unsigned long long ull;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); i++ )
#define UREP( i, m, n ) for ( unsigned int i = (unsigned int)( m ); i < (unsigned int)( n ); i++ )

#define ITER( c ) __typeof( (c).begin() )
#define IREP( c, it ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()
#define RALL( c ) (c).rbegin(), (c).rend()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

const int CONTENTS[] = { 200, 300, 500 };
const int PRICE[] = { 380, 550, 850 };
const int UNIT[]= { 5, 4, 3 };
const double DISCOUNT[] = { 0.8, 0.85, 0.88 };

int main()
{
	while ( true )
	{
		int n;
		cin >> n;

		if ( n == 0 )
		{
			break;
		}

		int min = INT_MAX;
		int shop[] = { 0, 0, 0 };

		for ( shop[0] = 0; shop[0] * CONTENTS[0] <= n * 10; shop[0]++ )
		{
			for ( shop[1] = 0; shop[1] * CONTENTS[1] <= n * 10; shop[1]++ )
			{
				for ( shop[2] = 0; shop[2] * CONTENTS[2] <= n * 10; shop[2]++ )
				{
					int sum = 0;
					double price = 0;

					REP ( l, 0, 3 )
					{
						sum += CONTENTS[l] * shop[l];

						price += ( ( shop[l] / UNIT[l] ) * UNIT[l] ) * PRICE[l] * DISCOUNT[l];
						price += ( shop[l] % UNIT[l] ) * PRICE[l];
					}

					if ( n <= sum && price < min )
					{
						min = price;
					}
				}
			}
		}

		cout << min << endl;
	}

	return 0;
}