#include <iostream>
#include<string>
#include<queue>
#include<utility>
#include<algorithm>
#include<math.h>
using namespace std;
int main() {
    int n,sum;
    while(1){
        sum=0;
        cin>>n;
        if(n==0)break;
        if((double)n/1200>=0.0){
            sum+=n/1200*550*4*0.85;
            n-=(n/1200)*1200;
        }
        if((double)n/1000>=0.0){
            sum+=n/1000*380*5*0.8;
            n-=(n/1000)*1000;
        }
        if(n>=500){
            sum+=n/500*850;
            n-=(n/500)*500;
        }
        if(n>=300){
            sum+=n/300*550;
            n-=(n/300)*300;
        }
        if(n>=200){
            sum+=n/200*380;
            n-=(n/200)*200;
        }
        cout<<sum<<endl;
        
    }
    
    return 0;
}
