#include<iostream>
#include<algorithm>
using namespace std;
int f(int a, int b, int c) {
	int r = 0;
	r += (a % 5) * 380;
	r += (a / 5) * 1520;
	r += (b % 4) * 550;
	r += (b / 4) * 1870; 
	r += (c % 3) * 850;
	r += (c / 3) * 2244;
	return r;
}
int main() {
	int n;
	while (cin >> n, n) {
		int ans = 114514;
		for (int i = 0; i <= 10; i++) {
			for (int j = 0; j <= 10; j++) {
				for (int k = 0; k <= 10; k++) {
					if (i * 200 + j * 300 + k * 500 == n)ans = min(ans, f(i, j, k));
				}
			}
		}
		cout << ans << endl;
	}
	return 0;
}
