#include <bits/stdc++.h>
int main() {
  int n, s, i, x[102], flag = 0, y[102], max = 0;
  scanf("%d", &n);
  scanf("%d", &s);
  for (i = 0; i < n; i++) {
    scanf("%d", &x[i]);
    scanf("%d", &y[i]);
  }
  for (i = 0; i < n; i++) {
    if (x[i] < s) {
      flag = 1;
      if ((100 - y[i] >= max) && (100 - y[i] < 100)) max = 100 - y[i];
    }
    if (x[i] == s && y[i] == 0) flag = 1;
  }
  if (flag == 0)
    printf("%d", -1);
  else
    printf("%d", max);
  return 0;
}
