def comb(sum)
  ans=[]
  a=sum/200
  b=sum/300
  c=sum/500
  for i in 0.. a
    for j in 0.. b
      for k in 0.. c
        if 200*i+300*j+500*k == sum
          ans.push([i,j,k])
        end
      end
    end
  end
  return ans
end
 
def price(c)
  ans=0
  price=100000000
  p = [[1520,1870,2244],[380,550,850]]
  for i in 0.. c.length-1
    tp=0
    for j in 0.. 2
      t = c[i][j]/(5-j)
      tp += t*p[0][j]+(c[i][j]-t*(5-j))*p[1][j]
    end
    if tp<price
      price = tp
      ans = i
    end
  end
  puts price
end
 
 
while true
  g=gets.to_i
  if g==0 then break end
  price(comb(g))
end