program green
  implicit none
  integer(8) :: d, g, i, ans, j, x(1)
  integer(8),allocatable :: p(:),c(:), total(:), flag(:)
  double precision, allocatable :: ave(:)

  ans = 0
  read *, d, g
  allocate(p(d))
  allocate(c(d))
  allocate(total(d))
  allocate(ave(d))
  allocate(flag(d))
  
  do i = 1, d
    read *, p(i), c(i)
  if (g > i*p(i)*100 + c(i)) then
    ave(i) = i*100+dble(c(i))/dble(p(i))
    total(i) = i*p(i)*100 + c(i)
    flag(i) = 0
  else if (i*(p(i)-1)*100 < g .and. g <= i*p(i)*100 + c(i)) then
    ave(i) = dble(g)/dble(p(i))
    total(i) = g
    flag(i) = 1
  else
    if (mod(g,i*100) /= 0) then
      ave(i) = g/(g/(i*100)+1)
    else
      ave(i) = i*100
    end if
    total(i) = g 
    flag(i) =2
  end if
  end do
  
  do while (g>0)
    x = maxloc(ave)
    if (total(x(1)) < g) then 
      g = g - total(x(1))
      ans = ans + p(x(1))
      flag(x(1)) = 3
    else
      if (flag(x(1)) == 1) then
        ans = ans + p(x(1))
      else
        if (mod(g,x(1)*100) /= 0) then 
          ans = ans + g/(x(1)*100)+1
        else
          ans = ans + g/(x(1)*100)  
        end if
      end if
      g = 0
    end if
    do j = 1, d
      if (flag(j) == 3) then
        ave(j) = 0
        total(j) = 0
      else if (g > j*p(j)*100 + c(j)) then
        ave(j) = j*100+dble(c(j))/dble(p(j))
        total(j) = j*p(j)*100 + c(j)
        flag(j) = 0
      else if (j*(p(j)-1)*100 < g .and. g <= j*p(j)*100 + c(j)) then
        ave(j) = dble(g)/dble(p(j))
        total(j) = g
        flag(j) = 1
      else
        ave(j) = g/(g/(j*100)+1)
        total(j) = g 
        flag(j) =2
      end if
    end do
  end do
  print '(i0)', ans
  stop
end program green
