#include <bits/stdc++.h>

using namespace std;

const double INF = 1e9;
double cost[6000];

double calc(int i, int j, int k) {
    return (380 * ((i / 5) * 5 * 0.8  + (i % 5)) +
            550 * ((j / 4) * 4 * 0.85 + (j % 4)) +
            850 * ((k / 3) * 3 * 0.88 + (k % 3)));
}

int main(void) {
    fill(cost, cost + 6000, INF);

    int n = 5000, sum;
    for (int i = 0; 200 * i <= n; i++)
        for (int j = 0; 300 * j <= n - 200 * i; j++)
            for (int k = 0; 500 * k <= n - i * 200 - j * 300; k++) {
                sum = 200 * i + 300 * j + 500 * k;
                cost[sum] = min(cost[sum], calc(i, j, k));
            }
    
    while (scanf("%d", &n), n)
        printf("%d\n", (int)cost[n]);

    return 0;
}
