#define _CRT_SECURE_NO_WARNINGS
#include"bits/stdc++.h"
#ifdef _DEBUG
#define DBG(n) n
#else
#define DBG(n)
#endif
#define INF         1e9
#define INFLL       1e18
#define EPS         1e-9
#define REP(i,n)    for(ll i=0,i##_len=(n);i<i##_len;++i)
#define REP1(i,n)   for(ll i=1,i##_len=(n);i<=i##_len;++i)
#define REPR(i,n)   for(ll i=(n)-1;i>=0;--i)
#define REPR1(i,n)  for(ll i=(n);i>0;--i)
#define REPC(i,obj) for(auto i:obj)
#define ALL(obj)    (obj).begin(),(obj).end()
#define SETP(n)     cout<<fixed<<setprecision(n)
using namespace std;
using ll = long long;
template<typename T = ll>inline T in() { T ret; cin >> ret; return ret; }

ll n, ans;
void dfs(ll a, ll b, ll c)
{
	ll g = a * 200 + b * 300 + c * 500;
	if (g == n) {
		ll y = (a - a % 5) * 304 + a % 5 * 380 + (b - b % 4) / 4 * 1870 + b % 4 * 550 + (c - c % 3) * 748 + c % 3 * 850;
		ans = min(ans, y);
	} else if (g < n) {
		dfs(a + 1, b, c);
		dfs(a, b + 1, c);
		dfs(a, b, c + 1);
	}
}
signed main()
{
	while ((n = in()) != 0) {
		ans = INFLL;
		dfs(0, 0, 0);
		cout << ans << endl;
	}
}
