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