#include<iostream>
#include<algorithm>
using namespace std;

int main(){
  int g;
  int dp[3][100];

  
  for(int i=0;i<100;i++){
    int tmp = i/2;
    if(i>2*tmp)tmp++;
    dp[0][i] = (tmp/5) * 1520 + (tmp%5) * 380;
  }

  for(int i=0;i<100;i++){
    dp[1][i] = dp[0][i];
    for(int j=1;j<=i;j++){
      int tmp = j/3;
      if(j>3*tmp)tmp++;
      dp[1][i] = min(dp[1][i],dp[0][i-j] + (tmp/4) * 1870 + (tmp%4) * 550);
    }
  }

  for(int i=0;i<100;i++){
    dp[2][i] = dp[1][i];
    for(int j=1;j<=i;j++){
      int tmp = j/5;
      if(j>5*tmp)tmp++;
      dp[2][i] = min(dp[2][i],dp[1][i-j] + (tmp/3) * 2244 + (tmp%3) * 850);
    }
  }
  /*
  for(int i=0;i<51;i++){
    cout << i << ":" << dp[2][i] << endl;
  }
  */
  while(1){
    cin >> g;
    if(!g)break;
   
    cout << dp[2][g/100] << endl;
  }
}