#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int n;
int memo[32][32][32];
int solve(int a, int b, int c){
  if(memo[a][b][c]) return memo[a][b][c];
  if(a * 200 + b * 300 + c * 500 > n) return 999999999;
  if(a * 200 + b * 300 + c * 500 == n) return 0;
  int ret = 999999999;
  ret = min(ret, min(solve(a + 1, b, c) + 380, solve(a + 5, b, c) + (int)(380 * 5 * 0.8)));
  ret = min(ret, min(solve(a, b + 1, c) + 550, solve(a, b + 4, c) + (int)(550 * 4 * 0.85)));
  ret = min(ret, min(solve(a, b, c + 1) + 850, solve(a, b, c + 3) + (int)(850 * 3 * 0.88)));
  return memo[a][b][c] = ret;
}
int main(void){
  for( ; ; ){
    scanf("%d", &n);
    if(!n) break;
    memset(memo, 0, sizeof(memo));
    printf("%d\n", solve(0, 0, 0));
  }
}
