#include <cstdio>
#define INF 1000000000

int price;
int weight;

int main() {
  while(scanf("%d", &weight), weight) {
    price = INF;
    for (int i=0; i<=25; i++) {
      for (int j=0; j<=16; j++) {
	for (int k=0; k<=10; k++) {
	  int w = i*200 + j*300 + k*500;
	  if (weight == w) {
	    int calc_price = 
	      ((i/5)*5) * 380 * 0.8 + (i%5)*380
	      + ((j/4)*4) * 550 * 0.85 + (j%4)*550
	      + ((k/3)*3) * 850 * 0.88 + (k%3)*850;
	    if (price > calc_price) {
	      price = calc_price;
	    }
	    break;
	  } else if (weight < w) {
	    break;
	  }
	}
      }
    }	

    printf("%d\n", price);
  }
}