//32
#include<iostream>
#include<algorithm>

using namespace std;

int main(){
  for(int n;cin>>n,n;){
    int mc=1<<30;
    for(int a=0;a*200<n+200;a++){
      for(int b=0;a*200+b*300<n+300;b++){
	for(int c=0;a*200+b*300+c*500<n+500;c++){
	  if(a*200+b*300+c*500>=n){
	    int cst=a*380+b*550+c*850-(a/5)*380*20*5/100-(b/4)*550*15*4/100-(c/3)*850*12*3/100;
	    mc=min(cst,mc);
	  }
	}
      }
    }
    cout<<mc<<endl;
  }
  return 0;
}