#include<iostream>
#include<algorithm>

using namespace std;
int weight[]={200,300,500,1000,1200,1500};
int money[]={380,550,850,380*4,550*4*0.85,850*3*0.88};

int check(int i,int sum)
{
  //cout<<i<<"  "<<sum<<endl;
  if(sum<0|| i>5)
    return 99999;
  if(sum==0)
    return 0;
  return min(check(i+1,sum),money[i]+check(i,sum-weight[i]));
}

int main()
{
  int n;
  for(;cin>>n,n;)
    {
      int ans=99999;
      cout<<check(0,n)<<endl;
    }
}