#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int in;
  while(cin>>in,in){
    double mini=1e9;
    rep(i,in/500+1){
      if(in-i*500>=0)rep(j,(in-i*500)/300+1){
	  if(in-i*500-j*300>=0)rep(k,(in-i*500-j*300)/200+1){
	      if(in!=i*500+j*300+k*200)continue;
	      //	      cout<<i<<" "<<j<<" "<<k<<endl;
	      double sum=850*(i%3)+850*(i/3)*3*0.88;
	      sum+=550*(j%4)+550*(j/4)*4*0.85;
	      sum+=380*(k%5)+380*(k/5)*5*0.80;
	      mini=min(mini,sum);
	      //	      cout<<i<<" "<<j<<" "<<k<<" "<<sum<<endl;
	    }
	}
    }
    cout<<(int)mini<<endl;
  }

}