#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const double eps = 1e-9;
const double pi = acos(-1.0);
int main() {
  int n, s;
  cin >> n >> s;
  int res = -1;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (y == 0) {
      if (s >= x) {
        res = max(res, 0);
      }
    } else {
      if (s > x) {
        res = max(res, 100 - y);
      }
    }
  }
  cout << res << endl;
  return 0;
}
