#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
typedef long long int ll;

#define BIG_NUM 2000000000

using namespace std;

int N;

void func(){

	int minimum = BIG_NUM,num_a,num_b,num_c,tmp;

	for(int a = 0; a <= N; a += 200){
		for(int b = 0; b <= N; b += 300){
			if(a+b > N)break;
			for(int c = 0; c <= N; c += 500){
				if(a+b+c > N)break;

				if(a+b+c == N){
					num_a = a/200;
					num_b = b/300;
					num_c = c/500;
					tmp = 380*(num_a%5)+550*(num_b%4)+850*(num_c%3)+304*(num_a - num_a%5)+1870*(num_b-num_b%4)/4+748*(num_c-num_c%3);
					minimum = min(minimum,tmp);
				}
			}
		}
	}
	printf("%d\n",minimum);

}

int main(){

	while(true){
		scanf("%d",&N);
		if(N == 0)break;

		func();
	}

	return 0;
}