#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)
#define if_range(x, y, w, h) if (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))

const int INF = 10000000;
int dx[4]={-1, 0, 1, 0}, dy[4]={0, -1, 0, 1};
using namespace std;
typedef pair<int, int> P;

/** Problem0106 : Discounts of Buckwheat **/
int main()
{
	int price[5000]; fill(price, price+5000, INF);
	rep(a, 25) {
		rep(b, 25) {
			rep(c, 25) {
				int g = 200*a + 300*b + 500*c;
				int p = 380*a - (a/5*380*0.2*5) + b*550 - (b/4*550*0.15*4) + c*850 - (c/3*850*0.12*3);
				
				if (g>5000) continue;
				price[g] = min(price[g], p);
			}
		}
	}
	
	int in;
	while (cin>>in, in) {
		cout << price[in] << endl;
	}
}