#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int n, ans;
int w[] = {200,300,500};
int p[] = {380,550,850};
int k[] = {5,4,3};
int d[] = {380,330,306};

void solve(int weight , int cost, vector<int> num){
	if( weight >= n ){
		ans = min( ans , cost );
		return;
	}
	for(int i=0 ; i < 3 ; i++ ){
		num[i]++;
		int cost_ = cost;
		if( num[i] % k[i] == 0 ){
			cost_ -= d[i];
		}
		solve( weight+w[i] , cost_+p[i] , num );
		num[i]--;
	}
}

int main(){
	while( cin >> n , n ){
		vector<int> num;
		for(int i=0 ; i < 3 ; i++ )
			num.push_back(0);
		ans = 1000000;
		solve( 0 , 0 , num );
		cout << ans << endl;
	}
}