#include <bits/stdc++.h>
using namespace std;
long long int modpow(long long int a, long long int n, long long int temp) {
  long long int res = 1, y = a;
  while (n > 0) {
    if (n & 1) res = (res * y) % temp;
    y = (y * y) % temp;
    n /= 2;
  }
  return res % temp;
}
long long int gcd(long long int a, long long int b) {
  long long int c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}
void seive() {
  int i, j;
  int MAX = 1000006;
  int isprime[1000006];
  isprime[0] = isprime[1] = 1;
  for (i = 4; i < MAX; i += 2) isprime[i] = 1;
  for (i = 3; i * i < MAX; i += 2) {
    if (!isprime[i]) {
      for (j = i * i; j < MAX; j += 2 * i) {
        isprime[j] = 1;
      }
    }
  }
}
int main() {
  double n, s, maxit = -1, val1, val2, calc = 0, val, init;
  int i, cnt, ans, flagit = 0, changeit, fl = 0, fll = 0;
  scanf("%lf", &n);
  scanf("%lf", &s);
  for (i = (int)0; i < (int)n; ++i) {
    scanf("%lf", &val1);
    scanf("%lf", &val2);
    init = val1;
    val1 += val2 / 100.0;
    calc = 0;
    if (val1 <= s) {
      fll = 1;
      if (val2 != 0) {
        changeit = 100 - val2;
        maxit = ((maxit) > (changeit) ? (maxit) : (changeit));
        if (changeit >= maxit) {
          maxit = changeit;
        }
        fl = 1;
      } else {
      }
    }
  }
  if (fl == 0 && fll == 1) {
    printf("0\n");
    return 0;
  }
  ans = (int)maxit;
  printf("%d\n", ans);
  return 0;
}
