#include<iostream>
using namespace std;

int main() {
	int g;
	while (cin >> g, g) {
		int MAX = 10000;
		for (int i = 0;i <= g / 200;i++) {
			for (int j = 0;j <= g / 300;j++) {
				for (int k = 0;k <= g / 500;k++) {
					int h = i * 380 + (j * 550) + (k * 850);
					if (i >= 5) {
						int p = i / 5;
						h -= 380 * (p * 5)*0.2;
					}
					if (j >= 4) {
						int q = j / 4;
						h -= 550 * (q * 4)*0.15;
					}
					if (k >= 3) {
						int r = k / 3;
						h -= 850 * (r * 3)*0.12;
					}
					int a = 200 * i + (300 * j) + (500 * k);
					if (a == g) {
						if (MAX > h) {
							MAX = h;
						}
					}
				}
			}
		}
		cout << MAX << endl;
	}
	return 0;
}