loop do
  break if (n=gets.to_i)==0
  min=80000
  for a in 0..n/200 do
    for b in 0..(n-200*a)/300 do
      for c in 0..(n-200*a-300*b)/500 do
        if a*200+b*300+c*500==n then
          p=a/5*1520+a%5*380+b/4*1870+b%4*550+c/3*2244+c%3*850
          min=p if p < min
        end
      end
    end
  end
  p min
end