import scala.io.StdIn.readInt
import scala.collection.mutable.ArrayBuffer

object Main {
  def getPrice(total:Int,a:Int,b:Int,c:Int,d:Array[Array[Array[Int]]]):Int = {
    if(total==0) {
      d(a)(b)(c)=((a/5)*5*380*0.8+((a%5)*380)*1.0+(b/4)*4*550*0.85+(b%4)*550*1.0+(c/3)*3*850*0.88+(c%3)*850).toInt
      d(a)(b)(c)
    } else if(d(a)(b)(c)>0) d(a)(b)(c)
    else {
      var min = Int.MaxValue
      if(total==200 || total>=400) {
        val p = getPrice(total-200,a+1,b,c,d)
        if(p<min) min = p
      }
      if(total==300 || total>=500) {
        val q = getPrice(total-300,a,b+1,c,d)
        if(q<min) min = q
      }
      if(total==500 || total>=700) {
        val r = getPrice(total-500,a,b,c+1,d)
        if(r<min) min = r
      }
      min
    }
  }

  def main(args:Array[String]) = {
    val b = new ArrayBuffer[Int]
    var n = 0
    while({n=readInt;n}!=0) {
      val d = Array.ofDim[Int](n/200+1,n/300+1,n/500+1)
      b+=getPrice(n,0,0,0,d)
    }
    println(b.mkString("\n"))
  }
}