#include <cstdio>
#include <algorithm>

int gram;
int memo[30][30][30];

int solve(int A, int B, int C)
{
  if (memo[A][B][C] != -1)
    return memo[A][B][C];

  if (A*200 + B*300 + C*500 >= gram)
    return A*380 + B*550 + C*850 - (A/5*380 + B/4*330 + C/3*306);

  int ret =  std::min(solve(A+1, B, C), std::min(solve(A, B+1, C), solve(A, B, C+1)));
  return memo[A][B][C] = ret;
}

int main()
{
  while (~scanf("%d", &gram)) {
    if (gram == 0)
      break;
    for (int i = 0; i < 30; ++i) {
      for (int j = 0; j < 30; ++j) {
	for (int k = 0; k < 30; ++k)
	  memo[i][j][k] = -1;
      }
    }
    printf("%d\n", solve(0, 0, 0));
  }
  return 0;
}