import std.stdio;
import std.string;
import std.conv;
import std.algorithm;

int n;

int dfs(int a, int b, int c, int price) {
    int res;
    if (200 * a + 300 * b + 500 * c == n) return price;
    else if (200 * a + 300 * b + 500 * c > n) return 999999;
    else {
        int p1, p2, p3;
        p1 = price + 380; if ((a + 1) % 5 == 0) p1 = p1 - 380;
        p2 = price + 550; if ((b + 1) % 4 == 0) p2 = p2 - (55 * 6);
        p3 = price + 850; if ((c + 1) % 5 == 0) p3 = p3 - (306);

        res = min(dfs(a + 1, b, c, p1), dfs(a, b + 1, c, p2));
        res = min(res, dfs(a, b, c + 1, p3));
    }
    
    return res;
}

int main()
{
    while (true) {
        n = readln().chomp().to!int();
        if (n == 0) break;
        writeln(dfs(0,0,0,0));
    }

    return 0;
}