#include<iostream>
#include<algorithm>
using namespace std;
#define NUM 6
#define MAX 5000
struct Data{int weight,cost;};
int main()
{
  int n;
  int dp[MAX+1]={0};
  Data item[NUM]={
    {200,380},{300,550},{500,850},{1000,1520},{1200,1870},{1500,2244}
  };
  for(int j=0;j<=MAX;j++)dp[j]=INT_MAX>>2;
  dp[0]=0;
  for(int i=0;i<NUM;i++){
    for(int j=item[i].weight;j<=MAX;j++){
      dp[j] = min( dp[j], dp[j-item[i].weight] + item[i].cost );
    }
  }

  while(cin>>n,n){
    cout<<dp[n]<<endl;
  }
}