#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  while (cin >> n >> s) {
    int x, y;
    int big = -1;
    for (int i = 0; i < n; ++i) {
      cin >> x >> y;
      if (x * 100 + y <= s * 100) {
        if (y == 0) y = 100;
        if (100 - y > big) {
          big = 100 - y;
        }
      }
    }
    cout << big << endl;
  }
  return 0;
}
