#include <iostream>
#include <limits.h>
using namespace std;

const int MAX_WEIGHT = 5000;
const int MIN_WEIGHT = 500;

struct Comodity{
	int weight, price, unit;
	double rate;
};

Comodity com_list[] = {
	{ 200, 380, 5, 0.8 },
	{ 300, 550, 4, 0.85 },
	{ 500, 850, 3, 0.88 },
};

enum{
	A,
	B,
	C,
};

int quantity( int remain, int unit_weight ){
	return remain > 0 ? remain / unit_weight + ( remain % unit_weight ? 1 : 0 ) : 0;
}

int calcPrice( int a, int b, int c ){
	int dis_a = a / com_list[ A ].unit * com_list[ A ].unit;
	int dis_b = b / com_list[ B ].unit * com_list[ B ].unit;
	int dis_c = c / com_list[ C ].unit * com_list[ C ].unit;
	a -= dis_a;
	b -= dis_b;
	c -= dis_c;
	return ( a * com_list[ A ].price ) + ( b * com_list[ B ].price ) + ( c * com_list[ C ].price )
		+ (int)( dis_a * com_list[ A ].price * com_list[ A ].rate )
		+ (int)( dis_b * com_list[ B ].price * com_list[ B ].rate )
		+ (int)( dis_c * com_list[ C ].price * com_list[ C ].rate );
}

int main()
{
	int weight;

	while( cin >> weight && weight ){
		int best_price = INT_MAX;
		int remain_a = weight;
		int a = quantity( remain_a, com_list[ A ].weight );
		for( ; a >= 0; --a ){
			int remain_b = remain_a - a * com_list[ A ].weight;
			int b = quantity( remain_b, com_list[ B ].weight );
			for( ; b >= 0; --b ){
				int remain_c = remain_b - b * com_list[ B ].weight;
				int c = quantity( remain_c, com_list[ C ].weight );
				best_price = min( best_price, calcPrice( a, b, c ) );
			}
		}
		cout << best_price << endl;
	}

	return 0;
}