#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, s;
  while (cin >> n >> s) {
    long long ans = 0;
    bool fl = false;
    for (long long i = 0; i < n; i++) {
      long long a, b;
      cin >> a >> b;
      if (a > s) continue;
      if (a == s && b > 0) continue;
      fl = true;
      if (b == 0) continue;
      long long swt = 100 - b;
      if (swt > ans) ans = swt;
    }
    if (fl)
      cout << ans << endl;
    else
      cout << -1 << endl;
  }
  return 0;
}
