#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  cin >> n >> s;
  int ans = -1;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    if (y != 0 && x > s || y == 0 && x > s || x == s && y > 0) continue;
    ans = std::max(ans, y == 0 ? 0 : 100 - y);
  }
  cout << ans << endl;
  return 0;
}
