#include <iostream>
#include <deque>
#include <algorithm>

using namespace std;

int ret;
int w;

void solve(int tmpw, int c){
  //cout << "tmpw = " << tmpw << endl;
  if(c >= ret) return;
  if(tmpw == 0){
	ret = min(ret, c);
	return;
  }
  if(c+850*3*0.88 < ret && tmpw - 1500 >= 0){
	solve(tmpw-1500, c+850*3*0.88);
  }
  if(c+380*5*0.8 < ret && tmpw-1000 >= 0){
	solve(tmpw-1000, c+380*5*0.8);
  }
  if(c+550*4*0.85 < ret && tmpw-1200 >= 0){
	solve(tmpw-1200, c+550*4*0.85);
  }
  if(c+850 < ret && tmpw - 500 >= 0){
	solve(tmpw-500, c+850);
  }
  if(c+550 < ret && tmpw - 300 >= 0){
	solve(tmpw-300, c+550);
  }
  if(c+300 < ret && tmpw - 200 >= 0){
	solve(tmpw-200, c+380);
  }
  
  return;
}

int main(void){
  while(cin >> w && w){
	ret = 1 << 30;
	solve(w,0);
	cout << ret << endl;
  }
}