#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    int quantity[] = {200, 300, 500};
    int value[] = {380, 550, 850};
    int unit[] = {5, 4, 3};
    int discount[] = {20, 15, 12};

    vector<int> cost(51, INT_MAX/2);
    cost[0] = 0;
    for(int i=1; i<=50; ++i){
        for(int j=0; j<3; ++j){
            int k = i - quantity[j]/100;
            if(k >= 0)
                cost[i] = min(cost[i], cost[k] + value[j]);

            k = i - quantity[j]/100 * unit[j];
            if(k >= 0)
                cost[i] = min(cost[i], cost[k] + value[j] * unit[j] * (100-discount[j]) / 100);
        }
    }

    for(;;){
        int n;
        cin >> n;
        if(n == 0)
            return 0;
        cout << cost[n/100] << endl;
    }
}