#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int main(){
  int dp[5001];
  int g[] ={200, 300, 500, 1000, 1200, 1500};
  int value[] ={380, 550, 850, 1520, 1870, 2244};

  fill(dp, dp+5001, 1 << 29);
  
  dp[0] = 0;
  
  for(int i = 0 ; i < 6 ; i++){
    for(int j = 0 ; j+g[i] <= 5000 ; j+=100){
      dp[j+g[i]] = min(dp[j+g[i]], dp[j]+value[i]);
    }
  }
  
  int n;
  while(cin >> n, n){
    cout << dp[n] << endl;
  }
  return 0;
}