#include <iostream>
#include <algorithm>

int main()
{
    int volumeBuckwheat;
    
    while (std::cin >> volumeBuckwheat) {
        if (volumeBuckwheat == 0) break;
        
        volumeBuckwheat /= 100;
        
        int money = 1000000;
        for (int i = 0; i < 26; ++i) {
            for (int j = 0; j < 17; ++j) {
                for (int k = 0; k < 11; ++k) {
                    if (2 * i + 3 * j + 5 * k == volumeBuckwheat) {
                        money = std::min(money, 
                                         i / 5 * 1520 + i % 5 * 380 +
                                         j / 4 * 1870 + j % 4 * 550 +
                                         k / 3 * 2244 + k % 3 * 850);
                    }
                }
            }
        }
        
        std::cout << money << std::endl;
    }

    return 0;
}