#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
  int n;
  int weight[] = {200, 300, 500, 1000, 1200, 1500};
  int price[] = {380, 550, 850, 380*5*0.8, 550*4*0.85, 850*3*0.88};
  const int MAXW = 5000;
  const int INF = 1<<23;
  vector<int> dp(2*MAXW, INF);
      
  for(int i=0; i<6; i++) dp[weight[i]] = price[i];
  for(int i=0; i<6; i++) {
    for(int j=0; j<=MAXW; j+=100) {
      if(j-weight[i] >= 0) {
	dp[j] = min(dp[j], dp[j-weight[i]] + price[i]);
      }
    }
  }
  
  while(cin >> n, n) {
    cout << dp[n] << endl;
  }
  
  return 0;
}