#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for( int i = 0; i < n; i++ )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 1000000000
#define mod 1000000007
#define INF2 1000000000000000000

int ans_m = INF;
int W[6] = {200, 300, 500, 1000, 1200, 1500};
int P[6] = {380, 550, 850, 1520, 1870, 2244}; 

void dfs (int k, int rest, int x) {
    if (rest == 0) {
        ans_m = min(ans_m, x);
        return;
    }
    if (k == 6 || rest < 0) {
        return;
    }
    for (int i = 0; i <= 25; i++) {
        if (rest - W[k] * i < 0) break;
        dfs(k + 1, rest - W[k] * i, x + P[k] * i);
    }
}

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int weight;
    cin >> weight;
    while (weight != 0) {
        ans_m = INF;
        dfs(0, weight, 0);
        cout << ans_m << endl;
        cin >> weight;
    }

    return 0;
}