#include <iostream>
using namespace std;

int main() {

  while(1) {

    int n;
    cin >> n;
    if(n == 0) break;

    int min = 1000000;
    int fee;
    for(int i=0;i<=n/200+1;i++) {
      for(int j=0;j<=n/300+1;j++) {
	for(int k=0;k<=n/500+1;k++) {
	  if(i*200+j*300+k*500 == n) {
	    fee = i*380 + j*550 + k*850;
	    if(i>=5) fee += ((i/5)*5*380)*0.8 -(i/5*5*380);
	    if(j >=4)fee += ((j/4)*4*550)*0.85 -(j/4*4 * 550);
	    if(k>=3) fee += ((k/3)*3*850)*0.88 -(k/3*3 * 850);
	    //cout <<i<<"*"<<j<<"*"<<k<<"="<< fee << endl;
	    if(min > fee) min = fee;
	  }
	}
      }
    }

    cout << min << endl;
  }

  return 0;

}