#include <cstdio>

int price;
int weight;

int calc_price(int a, int b, int c) {
  return 
    ((a/5)*5) * 380 * 0.8 + (a%5)*380
    + ((b/4)*4) * 550 * 0.85 + (b%4)*550
    + ((c/3)*3) * 850 * 0.88 + (c%3)*850;
}

void solve(int a, int b, int c) {
  int w = a*200 + b*300 + c*500;
  if (weight == w) {
    if (price >= calc_price(a,b,c)) {
      price = calc_price(a,b,c);
    }
    return;
  } else if (weight < w) {
    return;
  } else {
    solve(a+1, b, c);
    solve(a, b+1, c);
    solve(a, b, c+1);
  } 
}

int main() {
  while(scanf("%d", &weight), weight) {
    price = 1000000000;
    solve(0,0,0);

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