#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, d, c, sweets = -1;
  scanf("%d %d", &n, &s);
  for (int i = 0; i < n; ++i) {
    scanf("%d %d", &d, &c);
    if (d < s && c) {
      if (100 - c > sweets) sweets = 100 - c;
    } else if (d <= s && !c) {
      if (sweets == -1) sweets = 0;
    }
  }
  printf("%d\n", sweets);
  return 0;
}
