#include <bits/stdc++.h>
using namespace std;
long long t[200010];
int main() {
  int n, s;
  cin >> n >> s;
  int res = -1;
  int x, y;
  int ma = -1;
  for (int i = 0; i < n; ++i) {
    cin >> x >> y;
    if (x + y / 100.0 > s) continue;
    ma = max(ma, y > 0 ? 100 - y : y);
  }
  cout << ma << endl;
  return 0;
}
