#include <bits/stdc++.h>
using namespace std;
int main() {
  int maxx = 0, n, a = 0, s, x, y;
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (y != 0)
      if (s >= x + 1) {
        maxx = max(100 - y, maxx);
        a++;
      }
    if (y == 0 && s >= x) a++;
  }
  if (a == 0)
    cout << -1;
  else
    cout << maxx;
  return 0;
}
