#include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <sstream>
#include <cmath>
#include <climits>
#include <set>
#include <iostream>
#include <map>
#include <functional>
#include <cstdlib>
#include <numeric>
#include <queue>
#include <complex>
#include <sstream>
#include <stack>

using namespace std;

#define reep(i,f,n) for(int i=f; i<int(n); ++i)
#define rep(i,n) reep(i,0,n)

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef complex<double> Point;

int solve(int weight, int a, int b, int c)
{
	int sum = a*200 + b*300 + c*500;
	
	if(sum == weight)
		return a/5*1520 + a%5*380 + b/4*1870 + b%4*550 + c/3*2244 + c%3*850;
	
	int best = 1<<29;
	if(sum+200 <= weight)
		best = min(best, solve(weight, a+1, b, c));
	if(sum+300 <= weight)
		best = min(best, solve(weight, a, b+1, c));
	if(sum+500 <= weight)
		best = min(best, solve(weight, a, b, c+1));
	
	return best;
}

int main()
{
	int weight;
	while(scanf("%d", &weight), weight){
		printf("%d\n", solve(weight, 0, 0, 0));
	}
	
	return 0;
}