#include <iostream>
#include <algorithm>

using namespace std;

const int inf = 999999;

int func(int n)
{
  double r = inf, v; 
  int s, t, u, w;

  for(int i = 0; i <= 25; i++){
    for(int j = 0; j <= 16; j++){
      for(int k = 0; k <= 10; k++){
	w = i*200+j*300+k*500;
	if(n == w){
	  s = i/5;
	  t = j/4;
	  u = k/3;
	  v = 0.8*5*s*380 + (i-5*s)*380 + 0.85*4*t*550 + (j-4*t)*550 + 0.88*3*u*850 + (k-3*u)*850;
	  r = min(r, v);
	} else if(n < w){
	  break;
	}
      }
    }
  }

  return (int)r;
}

int main()
{
  int n;

  while(cin >> n && n){
    cout << func(n) << endl;
  }

  return 0;
}