#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long int ll;

int w[6]={200,300,500,1000,1200,1500};
int v[6]={380,550,850,38*5*8,11*2*85,2244};

int main(){
	vector<int> dp(5500,1e9);
	dp[0]=0;
	for(int i=0;i<6;i++){
		for(int j=0;j+w[i]<5500;j++){
			if(dp[j]==1e9)continue;
			dp[j+w[i]]=min(dp[j+w[i]],dp[j]+v[i]);
		}
	}
	int n;
	while(cin >> n,n){
		cout << dp[n] << endl;
	}
}
