def cost_a(i)
    disc = (i/5)*5
    normal = i%5
    380*(normal+0.8*disc)
end
def cost_b(i)
    disc = (i/4)*4
    normal = i%4
    550*(normal+0.85*disc)
end
def cost_c(i)
    disc = (i/3)*3
    normal = i%3
    850*(normal+0.88*disc)
end

while s=STDIN.gets
    n=s.to_i
    exit 0 if n==0

    min = 10000000000000
    for a in 0..n/200 do
        for b in 0..(n-a*200)/300 do
            next if (n-a*200-b*300)%500!=0 
            c = (n-a*200-b*300)/500
            cost = (cost_a(a)+cost_b(b)+cost_c(c)).to_i
            min = cost if min > cost
        end
    end
    print min,"\n"
end