#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, s, mx = -1;
  cin >> n >> s;
  while (n--) {
    long long p, q;
    cin >> p >> q;
    if ((p <= s && q == 0) || (p < s)) {
      if (q != 0)
        mx = max(mx, 100 - q);
      else
        mx = max(mx, q);
    }
  }
  cout << mx << "\n";
  return 0;
}
