#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int k;
  cin >> k;
  int s = -1;
  for (int i = 1; i <= n; i++) {
    int t = 0;
    int a, b;
    cin >> a >> b;
    if (b == 0 && k >= a) {
      t = 0;
      if (t > s) s = 0;
    } else if (k > a) {
      if (100 - b > s) s = 100 - b;
    }
  }
  cout << s;
}
