#include <iostream>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;

#define INF 1<<28

int dp[5001];

int cost(int w) {
    if (w <= 0) return 0;
    if (dp[w] != -1) {
        return dp[w];
    }
    vector<int> costs(6);
    costs[0] = cost(w-200) + 380;
    costs[1] = cost(w-300) + 550;
    costs[2] = cost(w-500) + 850;
    costs[3] = cost(w-1000) + 1520;
    costs[4] = cost(w-1200) + 1870;
    costs[5] = cost(w-1500) + 2244;
    int min_cost = *min_element(costs.begin(), costs.end());
    dp[w] = min_cost;
    return min_cost;
}

int main() {
    int w;
    memset(dp, -1, sizeof(dp));
    while (cin >> w, w != 0) {
        cout << cost(w) << endl;
    }
    return 0;
}