#include <bits/stdc++.h>

using namespace std;


int TotalCount[3];

int calculation(int a, int b, int c) {
	int totalMoney = 0;

	totalMoney += (a / 5 * 5 * 0.8 + a % 5) * 380;
	totalMoney += (b / 4 * 4 * 0.85 + b % 4) * 550;
	totalMoney += (c / 3 * 3 * 0.88 + c % 3) * 850;

	return totalMoney;
}

int main() {
	int g, minMoney;

	while (cin >> g, g) {
		memset(TotalCount, 0, sizeof(TotalCount));

		TotalCount[0] = g / 200;
		TotalCount[1] = g / 300;
		TotalCount[2] = g / 500;

		minMoney = INT_MAX;
		for (int a = 0; a <= TotalCount[0]; a++) {
			for (int b = 0; b <= TotalCount[1]; b++) {
				for (int c = 0; c <= TotalCount[2]; c++) {
					if (a * 200 + b * 300 + c * 500 == g) {
						minMoney = min(minMoney, calculation(a, b, c));
					}
				}
			}
		}

		cout << minMoney << endl;
	}


	return 0;
}
