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

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

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

  for(int i=0;i<51;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)  * 34 * 55 + (tmp%4) * 550);
    }
  }

  for(int i=0;i<51;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) * 3 * 44 * 17 + (tmp%3) * 850);
    }
  }

  while(1){
    cin >> g;
    if(!g)break;

    cout << dp[2][g/100] << endl;
  }
}