#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int s;
  cin >> n >> s;
  int x;
  int y;
  int konf = -1;
  bool flag = false;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x < s) {
      flag = true;
      if (((100 - y) > konf) && y != 0) konf = (100 - y);
    } else if ((x == s) && (y == 0))
      flag = true;
  }
  if (flag && konf == -1)
    cout << "0" << endl;
  else
    cout << konf << endl;
  return 0;
}
