#include <iostream>
using namespace std;

int kona, minm;

void search(int k, int a, int b, int c){
  if(k <= 0){
    int am = (a / 5) * 5 * 380 * 0.8 + (a % 5) * 380;
    int bm = (b / 4) * 4 * 550 * 0.85 + (b % 4) * 550;
    int cm = (c / 3) * 3 * 850 * 0.88 + (c % 3) * 850;
    int all = am + bm + cm;
    if(all < minm) minm = all;
    return;
  }

  if(k >= 200) search(k - 200, a + 1, b, c);
  if(k >= 300) search(k - 300, a, b + 1, c);
  if(k >= 500) search(k - 500, a, b, c + 1);
}

int main(void){
  while(cin >> kona && kona != 0){
    minm = 100000000;
    search(kona, 0, 0, 0);
    cout << minm << endl;
  }
  return 0;
}