fun main(args: Array<String>) {
    val (dt, g) = readLine()!!.split(' ').map(String::toLong)
    val d = dt.toInt()
    val pArray = Array(d + 1) { arrayOfNulls<Long>(101) }
    val scoreArray = Array<Long?>(1001) { null }
    scoreArray[0] = 0L
    for (i in 1..d) {
        val (p, c) = readLine()!!.split(' ').map(String::toLong)
        for (j in 1..p.toInt()) {
            pArray[i][j] = (i.toLong() * 100) * j
            if (j == p.toInt()) pArray[i][j] = pArray[i][j]!! + c
        }
    }

    for (i in 1..d) {
        var selectNum = 1
        val scoreArrayBefore = scoreArray.copyOf()
        while (selectNum != 101 && pArray[i][selectNum] != null) {
            for (k in 1..1000) {
                if (selectNum > k) continue
                val value = scoreArrayBefore[k - selectNum] ?: break
                if (scoreArray[k] == null ||
                        scoreArrayBefore[k] ?: 0 < (value + pArray[i][selectNum]!!)) {
                    scoreArray[k] = value + pArray[i][selectNum]!!
                }
                if (scoreArray[k] ?: 0 >= g) break
            }
            selectNum++
        }
    }
    for (i in 1..1000) {
        if (scoreArray[i] ?: 0 >= g) {
            println(i)
            break
        }
    }
}