#include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <cassert>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define EACH(t,i,c) for(t::iterator i=(c).begin(); i!=(c).end(); ++i)
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int n;
int tani[]={5,4,3};
int value[]={380,550,850};
int wari[]={80,85,82};
int gg[]={200,300,500};

int dfs(vi &buy,int gram){
	if(gram>=n){
		int res=0;
		vi nb(buy);
		if(buy[0]==1&&buy[1]==0&&buy[2]==4){
			int j=1;
		}
		REP(i,3){
			while(buy[i]){
				if(buy[i]>=tani[i]){
					res+=value[i]*tani[i]*wari[i]/100;
					buy[i]-=tani[i];
				}else{
					res+=value[i]*buy[i];
					buy[i]=0;
				}
			}
		}
		return res;
	}
	int res=INT_MAX;
	REP(i,3){
		vi nb(buy);
		nb[i]++;
		res=min(res,dfs(nb,gram+gg[i]));
	}
	return res;
}

int main(){
	while(cin>>n,n){
		vi buy(3);
		cout<<dfs(buy,0)<<endl;
	}

}