#include<iostream>

using namespace std;

const int MAX = 5001;
const int INF = (1<<20);

int dp[MAX];
int price[2][6] = {
  {200,1000,300,1200,500,1500},
  {380,(380*5)*0.8,550,(550*4)*0.85,850,(850*3)*0.88}
};

void make(){

  fill(dp,dp+MAX,INF);

  for(int i = 0; i < 6; i++)
    dp[price[0][i]] = price[1][i];


  for(int i = 100; i < MAX; i+=100)
    for(int j = 0; j < 6; j++)
      if(i-price[0][j] >=0)
	dp[i] = min(dp[i],dp[i-price[0][j]]+price[1][j]);

    
     
}

int main(){
  int in;
  make();
  while(cin >> in && in) cout << dp[in] << endl;
  return 0;
}