#include<iostream>
#include<algorithm>
#define INF (1<<26)
using namespace std;

int n,ans;
int checkA(int);
int checkB(int);
int checkC(int);

int main(){
  while(cin>>n){
    if(n==0)break;

    ans=INF;
    for(int i=0;i<50;i++){
      for(int j=0;j<50;j++){
	for(int k=0;k<50;k++){

	  if(i*200+j*300+k*500>=n){
	    ans=min(ans,checkA(i)+checkB(j)+checkC(k));
	  }

	}
      }
    }    
    cout<<ans<<endl;
  }
  return 0;
}
int checkA(int cnt){
  int x = cnt - (cnt % 5), y = cnt % 5;
  return x*304 + y*380;
}

int checkB(int cnt){
  int x = cnt - (cnt % 4), y = cnt % 4;
  x/=4;
  return x*1870 + y*550;
}

int checkC(int cnt){
  int x = cnt - (cnt % 3), y = cnt % 3;
  return x*748 + y*850;
}