#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n, s;
  cin >> n >> s;
  s = 100 * s;
  int final = -1;
  while (n--) {
    int x, y;
    cin >> x >> y;
    int total = x * 100 + y;
    if (total == s) {
      final = max(final, 0);
    } else if (total < s) {
      final = max(final, 0);
      if ((x + 1) * 100 - total < 100 && (x + 1) * 100 - total >= 0)
        final = max(final, (x + 1) * 100 - total);
    }
  }
  cout << final << endl;
  return 0;
}
