import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.container;

void main()
{//dpっぽい?
	auto weight = [1000, 1200, 1500, 200, 300, 500];
	auto tplace =  [380*5*0.8, 550*4*0.85, 850*3*0.88, 380, 550, 850];
	auto place = tplace.map!(to!int).array;

	int[10000] dp;
	dp[] = int.max;
	foreach (i; 0..6) {
		dp[weight[i]] = place[i];
	}

	foreach (i; iota(100, 5001, 100)) {
		if (dp[i] == int.max) continue;
		foreach (j; 0..6) {
			dp[i + weight[j]] = min(dp[i + weight[j]], dp[i] + place[j]);
		}
	}

	int n;
	while (n = readln.chomp.to!int, n) {
		dp[n].writeln;
	}
}