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