#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  while (cin >> n >> s) {
    int mx = -1;
    for (int i = 0; i < n; i++) {
      int x, y;
      cin >> x >> y;
      if ((y == 0 && x <= s) || (y > 0 && x + 1 <= s)) {
        int v = (100 - y) % 100;
        mx = max(v, mx);
      }
    }
    cout << mx << "\n";
  }
  return 0;
}
