#include <iostream>

using namespace std;

int g;

void solve() {
	int A = g / 200, B = g / 300, C = g / 500;
	int ans = (int)1e9;
	
	for (int a = 0; a <= A; a++) {
		for (int b = 0; b <= B; b++) {
			if (200 * a + 300 * b > g) break;
			
			for (int c = 0; c <= C; c++) {
				if (200 * a + 300 * b + 500 * c > g) break;
				
				if (200 * a + 300 * b + 500 * c == g) {
					int unitA = a % 5, discA = a - unitA;
					int unitB = b % 4, discB = b - unitB;
					int unitC = c % 3, discC = c - unitC;
					
					int buyA = (380 * discA) * 0.8 + 380 * unitA;
					int buyB = (550 * discB) * 0.85 + 550 * unitB;
					int buyC = (850 * discC) * 0.85 + 850 * unitC;
					
					ans = min(ans, buyA + buyB + buyC);
				}
			}
		}
	}
	
	cout << ans << endl;
}

int main() {
	while (1) {
		cin >> g; if (g == 0) break;
		solve();
	}
	
	return 0;
}