#include<iostream>
#include<algorithm>
#define INF 1<<21
using namespace std;

int main(){
  int dp[5001];
  int items[]={200,300,500,1000,1200,1500};
  int prices[]={380,550,850,1520,1870,2244};
  int mg;
  for(int i=0;i<5001;i++){
    dp[i] = INF;
  }
  dp[0]=0;
  for(int i=0;i<6;i++){
    for(int j=0;j<5001-items[i];j++){
      dp[j+items[i]] = min(dp[j+items[i]],dp[j]+prices[i]);
    }
  }
  while(1){
    cin >> mg;
    if(mg == 0) break;
    cout << dp[mg] << endl;
  }
}