#include <cstdio>
#include <algorithm>
#define INF (1145141919)
using namespace std;

int w[] = {200, 300, 500};
int v[] = {380, 550, 850};
int u[] = {5, 4, 3};
int p[] = {20, 15, 12};
 
int main()
{
	int dp[5001];
	
	for (int i = 1; i <= 5000; i++){
		dp[i] = INF;
	}
	dp[0] = 0;
	
	for (int k = 0; k < 3; k++){
		for (int i = 5000; i >= 0; i--){
			if (dp[i] < INF){
				for (int j = 0; i + j * w[k] <= 5000; j++){
					int yen = dp[i] + v[k] * j;
					yen -= (v[k] * u[k] * p[k] / 100) * (j / u[k]);
					
					dp[i + w[k] * j] = min(dp[i + w[k] * j], yen);
				}
			}
		}
	}
	
	int g;
	while (scanf("%d", &g), g){
		printf("%d\n", dp[g]);
	}
	
	return 0;
}