#include <iostream>
#define INF 1000000000

using namespace std;

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