#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()

using namespace std;

typedef unsigned int uint;
typedef long long ll;

int cost(int a, int b, int c){
  int ret = 0;
  int aa = a % 5; a -= aa;
  int bb = b % 4; b -= bb;
  int cc = c % 3; c -= cc;
  ret += (int)(a * 380 * 0.80) + aa * 380;
  ret += (int)(b * 550 * 0.85 + 0.1) + bb * 550;
  ret += (int)(c * 850 * 0.88) + cc * 850;
  return ret;
}

int main(){
  int n;
  while(cin>>n, n){
    int ans = INT_MAX;
    n /= 100;
    for(int i = 0; i < n + 2; i+=2){
      for(int j = 0; i + j < n + 3; j+=3){
        int k = n - i - j + 4;
        //printf("%d %d %d => %d\n",i/2,j/3,k/5,cost(i/2,j/3,k/5));
        ans = min(ans, cost(i/2,j/3,k/5));
      }
    }
    cout << ans << endl;
  }
  return 0;
}