#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> x;
  vector<int> y;
  int n, m, k, l = 100;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> k;
    x.push_back(k);
    cin >> k;
    y.push_back(k);
  }
  int a = 0, b = 0, c = 0;
  for (int i = 0; i < n; i++) {
    if (x[i] < m) {
      a++;
      if (y[i] < l && y[i] != 0) l = y[i];
    } else if (x[i] == m && y[i] == 0 && a == 0)
      b++;
  }
  if (b > 0 && a == 0)
    l = 100;
  else if (b == 0 && a == 0)
    l = 101;
  cout << 100 - l << endl;
  return 0;
}
