#include <iostream>
#include <algorithm>
int main(){
		int weight[6] = {200,300,500,1000,1200,1500},price[6] = {380,550,850,1520,1870,2244};
		int n;
		while(std::cin >> n,n){
		
			const int INF = 50000;
			int dp[5001] = {0};
			for(int i=1;i<5001;i++){
				dp[i] = INF;
			}
			
			for(int i=0;i<6;i++){
				for(int j=0;j<=n;j++){
					if(j+weight[i] <= n)
						dp[j+weight[i]] = std::min(dp[j+weight[i]],dp[j]+price[i]);
				}
			}
			
			std::cout << dp[n] << std::endl;
		}
}