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