#include <cstdio>
#define INF 1000000000

int price;
int dp[11][11][11]; // dp table
int weight;

void solve(int a, int b, int c) {
  if (dp[a][b][c] != INF)
    return;

  int w = a*200 + b*300 + c*500;
  int calc_price = 
    ((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;

  
  if (weight == w) {
    if (price >= calc_price) {
      price = calc_price;
      dp[a][b][c] = calc_price;
    }
    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) {
    for (int i=0; i<11; i++)
      for (int j=0; j<11; j++)
	for (int k=0; k<11; k++)
	  dp[i][j][k] = INF;
    
    price = INF;
    solve(0,0,0);

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