#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int w;
  while (cin >> w, w) {
    int ans = 1 << 30;
    for (int i = 0; i * 200 <= w; i++) {
      for (int j = 0; j * 300 <= w; j++) {
        for (int k = 0; k * 500 <= w; k++) {
          if (i * 200 + j * 300 + k * 500 != w) continue;
          int sub = i * 380 + j * 550 + k * 850;
          sub -= (i / 5) * 5 * 380 * 20 / 100;
          sub -= (j / 4) * 4 * 550 * 15 / 100;
          sub -= (k / 3) * 3 * 850 * 12 / 100;
          ans = min(ans, sub);
        }
      }
    }
    cout << ans << endl;
  }

  return 0;
}
