#include <bits/stdc++.h>
using namespace std;
int n, s;
int A[120];
int B[120];
int isOk(int x) {
  if (B[x] == 0) {
    return A[x] <= s;
  } else {
    return A[x] <= (s - 1);
  }
}
int cal() {
  int ans = -1;
  int ansa = -1;
  for (int i = 1; i <= n; i++) {
    if (isOk(i)) ansa = 0;
    if (isOk(i) && B[i] != 0) {
      ans = max(ans, 100 - B[i]);
    }
  }
  if (ans == -1)
    return ansa;
  else
    return ans;
}
int main() {
  cin >> n >> s;
  for (int i = 1; i <= n; i++) {
    cin >> A[i] >> B[i];
  }
  cout << cal() << endl;
  return 0;
}
