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




while voltotal = gets.chomp.to_i
	break if voltotal == 0



minprice=10000000



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(a,b,c)
					minprice = price(a,b,c)
				end
			end
		end
	end
end
puts minprice
end