#include <iostream>

using namespace std;

int main(int argc, char *argv[]) {
  int n, price[51];
  for (int i = 0; i < 51; i++)
    price[i] = -1;
  price[15] = 2244;
  price[12] = 1870;
  price[10] = 1520;
  price[5] = 850;
  price[3] = 550;
  price[2] = 380;
  for (int i = 0; i < 51; i++) {
    for (int j = 0; j < i; j++) {
      if (j + 15 == i && price[j] > 0) {
        if ((price[i] < 0 ) ||
            (price[i] > 0 && price[j] + 2244 < price[i])) {
          price[i] = price[j] + 2244;
        }
      } else if (j + 12 == i && price[j] > 0) {
        if ((price[i] < 0) ||
            (price[i] > 0 && price[j] + 1870 < price[i])) {
          price[i] = price[j] + 1870;
        }
      } else if (j + 10 == i && price[j] > 0) {
        if ((price[i] < 0) ||
            (price[i] > 0 && price[j] + 1520 < price[i])) {
          price[i] = price[j] + 1520;
        }
      } else if (j + 5 == i && price[j] > 0) {
        if ((price[i] < 0) ||
            (price[i] > 0 && price[j] + 850 < price[i])) {
          price[i] = price[j] + 850;
        }
      } else if (j + 3 == i && price[j] > 0) {
        if ((price[i] < 0) ||
            (price[i] > 0 && price[j] + 550 < price[i])) {
          price[i] = price[j] + 550;
        }
      } else if (j + 2 == i && price[j] > 0) {
        if ((price[i] < 0) ||
            (price[i] > 0 && price[j] + 380 < price[i])) {
          price[i] = price[j] + 380;
        }
      }
    }
  }
  /*                                                                                                                                                                                                        
  for (int i = 0; i < 51; i++)                                                                                                                                                                              
    cout << i*100 << " : " << price[i] << endl;                                                                                                                                                             
  */
  while (true) {
    cin >> n;
    if (n == 0)
      break;
    cout << price[n/100] << endl;
  }
  return 0;
}