#include<bits/stdc++.h>
using namespace std;
struct shop{
  int gram,tanka,tekiyou,tanni;
};
int main(){
  int n;
  int nedan[10000]={};
  for(int i=0;i<10000;i++)
    nedan[i]=1000000000;
  struct shop a[3];
  a[0].gram=200;a[0].tanka=380;a[0].tekiyou=1520;a[0].tanni=1000;
  a[1].gram=300;a[1].tanka=550;a[1].tekiyou=1870;a[1].tanni=1200;
  a[2].gram=500;a[2].tanka=850;a[2].tekiyou=2244;a[2].tanni=1500;
  queue<pair<int,int> >nn;
  for(int i=0;i<3;i++){
    nn.push(make_pair(a[i].gram,a[i].tanka));nn.push(make_pair(a[i].tanni,a[i].tekiyou));
  }
  nedan[200]=380;nedan[300]=550;nedan[500]=850;nedan[1000]=1520;
  nedan[1200]=1870;nedan[1500]=2244;
  while(!nn.empty()){
    pair<int,int>now=nn.front();
    nn.pop();
    if(now.first>5000)
      continue;
    for(int i=0;i<3;i++){
      if(now.first+a[i].gram<=5000){
	if(nedan[now.first+a[i].gram]>nedan[now.first]+a[i].tanka){
	  nedan[now.first+a[i].gram]=nedan[now.first]+a[i].tanka;
	  nn.push(make_pair(now.first+a[i].gram,nedan[now.first+a[i].gram]));
	}
      }
      if(now.first+a[i].tanni<=5000){
	if(nedan[now.first+a[i].tanni]>nedan[now.first]+a[i].tekiyou){
	  nedan[now.first+a[i].tanni]=nedan[now.first]+a[i].tekiyou;
	  nn.push(make_pair(now.first+a[i].tanni,nedan[now.first+a[i].tanni]));
	}
      }
    }
  }
  while(cin>>n,n!=0)
    cout<<nedan[n]<<endl;
  return 0;
}