#include <bits/stdc++.h>
using namespace std;
int n, s;
int a[110][2];
int main() {
  scanf("%d %d", &n, &s);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &a[i][0], &a[i][1]);
  }
  int cnt = 0;
  int maxcnt = 0;
  int temp = 0;
  for (int i = 0; i < n; i++) {
    if ((a[i][0] == s && a[i][1] != 0) || a[i][0] > s)
      temp++;
    else
      cnt = 100 - a[i][1];
    if (cnt > maxcnt && cnt < 100) {
      maxcnt = cnt;
    }
    cnt = 0;
  }
  if (temp == n)
    printf("-1\n");
  else
    printf("%d\n", maxcnt);
  return 0;
}
