#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <stdio.h>
#include <string>
#include <string.h>
#include <queue>
#include <cmath>
#include <stack>
#include <map>
#include <vector>
#include <algorithm>

#define int64 long long int

using namespace std;

int main()
{
	int n, A, B, C, a, b, c, price, lowprice;
	
	while(1){
		cin >> n;
		if(n == 0) break;

		lowprice = 10000000;

		A = n / 200;
		B = n / 300;
		C = n / 500;

		for(a=0; a<=A; a++){
			for(b=0; b<=B; b++){
				for(c=0; c<=C; c++){
					if(a*200 + b*300 + c*500 != n) continue;
					price = 0;

					price += ((a/5)*5*380*80)/100 + (a%5)*380;
					price += ((b/4)*4*550*85)/100 + (b%4)*550;
					price += ((c/3)*3*850*88)/100 + (c%3)*850;

					if(price < lowprice) lowprice = price;
				}
			}
		}

		cout << lowprice << endl;
	}

	return 0;
}