data=[[200,380],[300,550],[500,850]]


def price(a,b,c)
	data=[[200,380],[300,550],[500,850]]
	pria=a/5*1520+a%5*data[0][1]
	prib=b/4*1870+b%4*data[1][1]
	pric=c/3*2240+c%3*data[2][1]
	price=pria+prib+pric
	return price
end


loop{
voltotal = gets.to_i
	if voltotal == 0
		break
	end
	minprice=9999

	for i in 0..5000/data[0][0]
		for j in 0..5000/data[1][0]
			for k in 0..5000/data[2][0]
				vol=i*data[0][0]+j*data[1][0]+k*data[2][0]
				if voltotal==vol
					if minprice > price(i,j,k)
						minprice = price(i,j,k)
					end
				end
			end
		end
	end
	puts minprice
}