#include <iostream>
#include <climits>
#include <algorithm>

using namespace std;

int dfs(int a, int b, int c, int n);
int calcAmount(int a, int b, int c);
int calcValue(int a, int b, int c);

int main() {
    int a, b, c;

    int n;

    while (cin >> n) {
        if(n == 0) break;
        a = 0; b = 0; c = 0;
        
        cout << dfs(a, b, c, n) << endl;
    }

        return 0;
}

int dfs(int a, int b, int c, int n) {
    int amount = calcAmount(a, b, c);

    if(amount == n) {
        return calcValue(a, b, c);
    } else if(amount > n) {
        return INT_MAX;
    } else {
        return min(min(dfs(a+1, b, c, n), dfs(a, b+1, c, n)), dfs(a, b, c+1, n));
    }
}

int calcAmount(int a, int b, int c) {
    return a*200 + b*300 + c*500;
}

int calcValue(int a, int b, int c) {
    a = 380*(a/5)*4 + 380*(a%5);
    b = 550*(b/4)*17/5 + 550*(b%4);
    c = 850*(c/3)*264/100 + 850*(c%3);

    return a+b+c;
}