#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <fstream>
#include <sstream>

using namespace std;

int n;

int price[3]={200,300,500};
int min_price;


int price_cal(int a, int b, int c){
    int ret=0;
    ret+=(a-a%5)*380*0.8 +a%5*380;
    ret+=(b-b%4)*550*0.85+b%4*550;
    ret+=(c-c%3)*850*0.88+c%3*850;
    //cout<<a<<" "<<b<<" "<<c<<endl;;
    return ret;
}

void soba(int a, int b, int c, int now){
    if(a*200+b*300+c*500==n){
        min_price=min(min_price,price_cal(a, b, c));
    }else if(a*200+b*300+c*500>n){
        
    }else{
        if(now==0){
            soba(a+1,b,c,0);
            soba(a,b+1,c,1);
            soba(a,b,c+1,2);
        }else if(now==1){
            soba(a,b+1,c,1);
            soba(a,b,c+1,2);
        }else{
            soba(a,b,c+1,2);
        }
    }
    
}





int main(){
    while(cin>>n){
        if(n==0)break;
        min_price=100000000;
        soba(0, 0, 0, 0);
        cout<<min_price<<endl;
    }
}