#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(0);
  cout.setf(ios::floatfield, ios::fixed);
  cout.precision(8);
  int res = -1;
  int n, s;
  cin >> n >> s;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    if (s * 100 >= x * 100 + y) {
      int cand = 0;
      if (y) cand = 100 - y;
      if (res == -1 || res < cand) res = cand;
    }
  }
  cout << res << endl;
  return 0;
}
