#include <iostream>
#include <deque>

using namespace std;

int main(void){
  int w, tmpw;
  int c;
  int ret;
  deque<pair<int, int> > q;
  
  while(cin >> w && w){
	q.push_back(make_pair(0,0));
	ret = 1<<30;
	while(!q.empty()){
	  tmpw = q.front().first;
	  c = q.front().second;
	  q.pop_front();
	  if(c >= ret){
		continue;
	  }
	  if(tmpw >= w){
		ret = min(ret, c);
		continue;
	  }

	  q.push_back(make_pair(tmpw+1500,c+850*3*0.88)); //@1.49
	  q.push_back(make_pair(tmpw+1000,c+380*5*0.8));  //@1.52
	  q.push_back(make_pair(tmpw+1200,c+550*4*0.85)); //@1.55
	  q.push_back(make_pair(tmpw+500,c+850));         //@1.7
	  q.push_back(make_pair(tmpw+300,c+550));         //@1.83
	  q.push_back(make_pair(tmpw+200,c+380));         //@1.9
	}
	cout << ret << endl;
  }
}