#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  cin >> n >> s;
  int ans = 0;
  bool ok = false;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x < s) {
      if (y > 0) ans = max(ans, 100 - y);
      ok = true;
    } else if (x == s && y == 0)
      ok = true;
  }
  if (!ok)
    cout << "-1\n";
  else
    cout << ans << "\n";
  return 0;
}
