#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  cin >> n >> s;
  int max_c = 0;
  int flag = 0;
  for (int i = 0; i < n; i++) {
    int temp1, temp2;
    cin >> temp1 >> temp2;
    if (s > temp1) {
      flag = 1;
      if (temp2) max_c = max(max_c, 100 - temp2);
    }
    if (s == temp1 && !temp2) {
      max_c = max(max_c, 0);
      flag = 1;
    }
  }
  if (flag)
    cout << max_c << endl;
  else
    cout << -1 << endl;
}
