#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, A[100], B[100], k, mk(-1);
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    cin >> A[i] >> B[i];
    if (A[i] < s || (A[i] == s && B[i] == 0)) {
      if (B[i] != 0)
        k = 100 - B[i];
      else
        k = 0;
      if (k > mk) mk = k;
    }
  }
  cout << mk << endl;
  return 0;
}
