class Soba
   def initialize(size,cost,discount,rate)
      @size=size
      @cost=cost
      @discount=discount
      @rate=rate*0.01
   end
   def buy(vol)
      return nil unless vol % @size == 0
      count=vol/@size
      buf=@cost*(count-(count % @discount))*(1-@rate)
      buf+=(count % @discount) * @cost
      return buf.to_i
   end
   def getsize
      @size
   end
end

arr=Array.new
arr << Soba.new(200,380,5,20)
arr << Soba.new(300,550,4,15)
arr << Soba.new(500,850,3,12)
until (n=gets.to_i) == 0 do
   table=Array.new
   ans=Array.new
   0.step(n,arr[0].getsize){|i|
      0.step(n,arr[1].getsize){|j|
         0.step(n,arr[2].getsize){|k|
         table << [i,j,k] if i + j + k == n
         }
      }
   }
   table.each{|e|
      ans << arr[0].buy(e[0])+arr[1].buy(e[1])+arr[2].buy(e[2])
   }
   puts ans.min
end