#include<iostream>
#include<algorithm>
#include<iomanip>
using namespace std;
#define rep(i,n) for(int i = 0 ; i < n ; ++i)
#define INF ( 1 << 30 )
int main(){
  int dp[5001];
  int item[] = { 200 , 300 , 500 , 1000 , 1200 , 1500 };
  int price[]= { 380 , 550 , 850 , 1520 , 1870 , 2244 };
  fill_n(dp,5001,INF);
  dp[0] = 0;
  rep(i,6) rep(j,5000 - item[i]){
    dp[j + item[i]] = min ( dp[j + item[i]] , dp[j] + price[i] );
  }
  int n;
  while(cin >> n , n) cout << dp[n] << endl;
}