#include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define INF (1<<29)

int main() {
	int x;
	while (cin >> x, x) {
		int ans = INF;
		REP(i, 5000/200 + 1) REP(j, 5000/300 + 1) REP(k, 5000/500 + 1) if (i*200+j*300+k*500 == x) {
			int tmp = int(i / 5 * (380 * 0.8) * 5 + i % 5 * 380
					+ j / 4 * (550 * 0.85) * 4 + j % 4 * 550
					+ k / 3 * (850 * 0.88) * 3 + k % 3 * 850);
			ans = min(ans, tmp);
		}
		cout << ans << endl;
	}
	return 0;
}