#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, l, m, n;
  cin >> i >> j;
  l = -1;
  for (k = 0; k < i; k++) {
    cin >> m >> n;
    if (m < j || (m == j && n == 0)) {
      if (n > 0)
        l = max(l, 100 - n);
      else
        l = max(l, 0);
    }
  }
  cout << l;
  return 0;
}
