#include <iostream>
using namespace std;

int main() {
  int combi[100000][3] = {0},m=0;
  int input,price[100000] = {0};
  int a,b,c,a1,b1,c1;

  while(cin >> input) {
    if(input = 0) break;
    for(int i=0;i<26;i++) {//generate combination of weight over input
      for(int j=0;j<17;j++) {
        for(int k=0;k<11;k++) {
          if(input <= 200*i + 300*j + 500*k) {
            combi[m][0] = i;
            combi[m][1] = j;
            combi[m][2] = k;
            m++;
          }
        }
      }
    }

    for(int i=0;i<m;i++) {//calculate price[i] from combi[i]
      a = combi[i][0] / 5;//sale
      a1 = combi[i][0] - a*5;//not sale
      b = combi[i][1] / 4;//sale
      b1 = combi[i][1] - b*4;//not sale
      c = combi[i][2] / 3;//sale
      c1 = combi[i][2] - c*3;//not sale
      price[i] = 1520 * a + 380 * a1 + 1870 * b + 550 * b1 + 2244 * c + 850 * c1;
    }

    sort(price,price+m);

    cout << price[0] << endl;
  }
}