#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, x[102], y[102], flag = 0, max = 0;
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; i++) {
    cin >> x[i];
    cin >> y[i];
  }
  for (int i = 0; i < n; i++) {
    if ((x[i] < s && y[i] >= 0) || (x[i] == s && y[i] == 0)) {
      flag = 1;
      if (y[i] != 0)
        if ((100 - y[i]) > max) max = 100 - y[i];
    }
  }
  if (flag == 0) {
    cout << "-1";
  } else
    cout << max;
  return 0;
}
