discount_A=(380 * 5 * 0.8).to_i
discount_B=(550 * 4 * 0.85).to_i
discount_C=(850 * 3 * 0.88).to_i
loop do
    s=gets.chomp.to_i
    break if (s==0)
    min_cost=100000
    s/=100
    for i in 0..(s/2)
        gA=s-2*i
        for j in 0..(gA/3)
            gB=gA-3*j
            if(gB%5==0)
                k=gB/5
                cost_A=(i/5)*discount_A+(i%5)*380
                cost_B=(j/4)*discount_B+(j%4)*550
                cost_C=(k/3)*discount_C+(k%3)*850
                x=cost_A+cost_B+cost_C
                min_cost=[x,min_cost].min
            end
        end
    end
    p min_cost
end