#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
	int n,mi;
	while (1){
		mi = 100000000;
		cin >> n;
		if (!n) break;
		for (int i = 0; i <= n / 500; i++){
			for (int j = 0; j <= (n - i * 500) / 300; j++){
				if ((n - i * 500 - j * 300) % 200) continue;
				int k = (n - i * 500 - j * 300) / 200;
				mi = min(mi, (int)(380 * (k / 5) * 5 * 0.8 + 380 * (k % 5) + 550 * (j / 4) * 4 * 0.85 + 550 * (j % 4) + 850 * (i / 3) * 3 * 0.88 + 850 * (i % 3)));
			}
		}
		cout << mi << endl;
	}
	return 0;
}