#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count etc.
#include <cstdlib>	// require abs
#include <cstdio>	// require printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>	// require tolower, toupper
#include <fstream>	// require freopen

using namespace std;
const double INF = (double)(1 << 20);
double dp[3][5001];			// gツづ個値ツ段ツ、

int main()
{
//	cut here before submit 
//	freopen ("testcase.DB", "r", stdin );

	const int g[3] = { 200, 300, 500 };
	const int t[3] = { 380, 550, 850 };
	const int d[3] = { 5, 4, 3 };
	const int r[3] = { 80, 85, 88 };

	for (int i = 0; i <= 5000; i++ ){
		for (int j = 0; j < 3; j++ ){
			dp[j][i] = INF;
		} // end for
	} // end for
	for (int j = 0; j < 3; j++ )
		dp[j][0] = 0.;

	for (int j = 0; j < 3; j++ ){
		for (int i = g[j], k = 1; i <= 5000; i += g[j], k++ ){
			dp[j][i] = dp[j][i-g[j]] + (double)t[j];
			if (k % d[j] == 0 ){
				if (k/d[j] == 1 ){
					dp[j][i] *= (double)r[j];
					dp[j][i] /= 100.;
				}else{
					dp[j][i] = dp[j][d[j]*g[j]]*(double)k/d[j];
				} // end if
			} // end if 
		} // end for
	} // end for
	int n;
	while (cin >> n, n ){
		int res = min(dp[0][n], min (dp[1][n], dp[2][n] ) );
		cout << res << endl;
	} // end while
/*
	for (int i = 0; i < 3; i++ ){
//	int i = 0;
		for (int j = 0; j <= 5000; j++ ){
			if (dp[i][j] != INF ){
				cout << "i: " << i << " j: " << setw(4) << j << " price: " << dp[i][j] << endl;
			} // end if
		} // end for
	} // end for 
*/		
	return 0;
}