#include <iostream>
#include <algorithm>
using namespace std;
int m[50];
int main()
{
  int i,j,k,a,b,c,n;
  for(i=1;i<=50;i++){
    if((i%2) != 0) a = 10000;
    else a = ((i+1)/10) * 1520 + ((i+1)%10)/2 * 380;
    if((i%3) !=0) b = 10000;
    else b = ((i+2)/12) * 1870 + ((i+2)%12)/3 * 550;
    if((i%5) !=0) c = 10000;
    else c = ((i+4)/15) * 2240 + ((i+4)%15)/5 * 850;
    n = min(a,min(b,c));
    j = 2; k = i-2;
    while(j <= k){
      if(n > m[j] + m[k]) n = m[j] + m[k];
      j++; k--;
    }
    m[i] = n;
  }
  for(;;){
    cin >> n;
    if(n==0) break;
    cout << m[n/100] << endl;
  }
  return 0;
}