#include<iostream>
#include<algorithm>
#include<float.h>
using namespace std;
typedef struct{
  double ryou;
  int tanka;
  int warimai;
  double wariritu;
}MISE;
MISE mise[3];
double mokuhyou;
double mem[3][100];
double shop(int now,double ryou,double money);
main(){
 mise[0].ryou=2;
 mise[1].ryou=3;
 mise[2].ryou=5;
 mise[0].tanka=380;
 mise[1].tanka=550;
 mise[2].tanka=850;
 mise[0].warimai=5;
 mise[1].warimai=4;
 mise[2].warimai=3;
 mise[0].wariritu=0.8;
 mise[1].wariritu=0.85;
 mise[2].wariritu=0.88;
 while(1){
   for(int i=0;i<3;i++){
     for(int j=0;j<100;j++){
       mem[i][j]=0.0;
     }
   }
   cin>>mokuhyou;
   if(mokuhyou==0)break;
   cout<<(int)shop(0,0.0,0.0)<<endl;
 }
}
double shop(int now,double ryou,double money){
  if(now==3&&ryou*100==mokuhyou){
    return mem[now][(int)ryou/100]=money;
  }
  else if(now==3){
    return DBL_MAX;
  }
  else if(mem[now][(int)ryou]!=0){
    return mem[now][(int)ryou];
  }
  else{
    double mins=DBL_MAX;
    int a=0;
    double before=0;
    mins=min(mins,shop(now+1,ryou,money+before));
    while(ryou*100<=mokuhyou){
      a++;
      ryou+=mise[now].ryou;
      if(a%mise[now].warimai==0){
	before=a*mise[now].tanka*mise[now].wariritu;
      }
      else{
	int aa=a/mise[now].warimai*mise[now].warimai;
	before=aa*mise[now].tanka*mise[now].wariritu+(a-aa)*mise[now].tanka;
      }
      mins=min(mins,shop(now+1,ryou,money+before));
    }
    return mem[now][(int)ryou]=mins;
  }
  return -1;
}