#include <iostream>
#include <iomanip>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>

using namespace std;

int main() {
	int w;
	int dp[5001];
	fill_n(dp, 5001, INT_MAX);
	for (int i = 0; i < 25; i++)
		for (int j = 0; j < 17; j++)
			for (int k = 0; k < 10; k++) {
				int cost = (i*380) - (i/5*380) + (j*550) - (j/4*330) + (k*850) - (k/3*306);
				int total = 200 * i + 300 * j + 500 * k;
				if (total <= 5000)
					dp[total] = min(dp[total], cost);
			}
	while (cin >> w && w) {
		cout << dp[w] << endl;
	}

	return 0;
}