#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, x, y, ans = -1;
  cin >> n >> s;
  vector<pair<int, int> > sugs;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    sugs.push_back(make_pair(x, y));
  }
  sort(sugs.begin(), sugs.end());
  for (int i = 0; i < sugs.size(); i++) {
    if (s > sugs[i].first) ans = max(ans, (100 - sugs[i].second) % 100);
    if (s == sugs[i].first && sugs[i].second == 0) ans = max(ans, 0);
  }
  cout << ans;
  return 0;
}
