#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

int na, nb, nc;
const int inf = INT_MAX;

int solve( int n ) {
    if ( n <= 0 ) {
        int ra = na % 5;
        int rb = nb % 4;
        int rc = nc % 3;
        int nna = na - ra;
        int nnb = nb - rb;
        int nnc = nc - rc;
        return (nna*380)*0.8+380*ra + (550*nnb)*0.85+550*rb + (850*nnc)*0.88+850*rc;
    }
    int answer = inf;
    na ++;
    answer = min( answer, solve( n - 200 ) );
    na --;
    nb ++;
    answer = min( answer, solve( n - 300 ) );
    nb --;
    nc ++;
    answer = min( answer, solve( n - 500 ) );
    nc --;
    return answer;
}

int main() {
    int n;
    while ( cin >> n && n != 0 ) {
        na = nb = nc = 0;
        cout << solve( n ) << endl;
    }
    return 0;
}