#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, s, max = 0, count = 0;
  cin >> n >> s;
  while (n--) {
    long long a, b;
    cin >> a >> b;
    if ((a == s && b == 0) || (a < s && b < 100)) {
      count++;
      if ((100 - b) > max && b != 0) {
        max = 100 - b;
      }
    }
  }
  if (count == 0) {
    cout << -1 << endl;
  } else {
    cout << max << endl;
  }
  return 0;
}
