program all_green
  implicit none
  integer :: d, g, p(10), c(10)
  integer :: i, j, n, s, m(10), ubnd, t
  p = 0
  c = 0
  m = 0
  read(*,*) d, g
  g = g/100
  n = 0
  ubnd = 2**d
  do i = 1, d
    read(*,*) p(i), c(i)
    c(i) = c(i)/100
    n = n + p(i)
    m(i) = i*p(i)+c(i)
  end do
  do j = 0, ubnd-1
    s = 0
    t = 0
    do i = 1, d
      if (btest(j,i-1)) then
        s = s + m(i)
        t = t + p(i)
      end if
    end do
    if (s.lt.g) then
      do i = d, 1, -1
        if (.not.btest(j,i-1)) then
          if (s+i*(p(i)-1).ge.g) then
            t = t + ceiling(real(g-s,8)/real(i,8))
            if (t.lt.n) n = t
          end if
          exit
        end if
      end do
    else
      if (t.lt.n) n = t
    end if
  end do
  write(*,'(i0)') n
  stop
end program all_green