fun main(args: Array<String>) {
    val (D, G) = readLine()!!.split(" ").map { it.toLong() }
    val ps = Array(D.toInt()) {
        val (p, c) = readLine()!!.split(" ").map { it.toLong() }
        Pair(p, c)
    }

    var res = 1e10.toLong()
    for (s in 0 until (1 shl D.toInt())) {
        var a = 0L
        var n = 0L
        for (j in ps.indices) {
            if (s and (1 shl j) != 0) {
                a += 100 * (j + 1) * ps[j].first + ps[j].second
                n += ps[j].first
            }
        }

        for (k in (D - 1).toInt() downTo 0) {
            if (a >= G) break
            if ((s shr k) and 1 == 1) continue

            val m = Math.max(Math.min(ps[k].first, (G - a + 100 * (k + 1) - 1) / (100 * (k + 1))), 0)
            a += 100 * (k + 1) * m
            n += m
        }

        if (a >= G) {
            res = Math.min(res, n)
        }
    }

    println(res)
}
