#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
static const int INFTY = (1 << 30);
int n;

int calc() {

    int res = INFTY, r1, r2, r3;
    for (int i = 0; i <= n / 500 + 1; i++) {
        r1 = i / 3 * 3 * 850 * 88/ 100 + i % 3 * 850;
        for (int j = 0; j <= n / 300 + 1; j++) {
            r2 = j / 4 * 4 * 550 * 85 / 100 + j % 4 * 550;
            if (r1 + r2 > res) break;
            for (int k = 0; k <= n / 200 + 1; k++) {
                if (i * 500 + j * 300 + k * 200 != n) continue;
                r3 = k / 5 * 5 * 380 * 80 / 100 + k % 5 * 380;
                if (res < r1+r2+r3) break;
                res = min(res, r1+r2+r3);
            }
        }
    }

    return res;
}


/*int calc2(int qA, int qB, int qC) {
    if (qA * 200 + qB * 300 + qC * 500 >= n) {
        int res = qA / 5 * 1520 + qA % 5 * 380 + qB / 4 * 1870 + qB % 4 * 550 + qC / 3 * 2244 + qC % 3 * 850;
        return res;
    }
    return min(calc2(qA+1, qB, qC), min(calc2(qA, qB+1, qC), calc2(qA, qB, qC+1)));
}*/

int main()  {
    for (; ;) {
        scanf("%d", &n);
        if (n == 0) break;
        cout << calc() << endl;
        //cout << calc2(0, 0, 0) << endl;

    }
    return 0;
}

