#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<queue>

#define INF 1000000000

using namespace std;

int p[] = {380, 550, 850, 1870, 1520, 2244};
int w[] = {200, 300, 500, 1200, 1000, 1500};

int main(void){

    int dp[5001];
    int g;

    for(int i = 0; i < 5001; i++){
        dp[i] = INF;
    }
    dp[0] = 0;
    for(int i = 0; i < 5000; i++){
        for(int j = 0; j < 6; j++){
            if(w[j] + i < 5001){
                if(dp[i] + p[j] < dp[i+w[j]]){
                    dp[i+w[j]] = dp[i] + p[j];
                }
            }
        }
    }


    while(scanf("%d", &g) && g != 0){
        printf("%d\n", dp[g]);
    }

    return 0;
}