#include <bits/stdc++.h>
template <typename T>
T min(T x, T y) {
  return x < y ? x : y;
}
template <typename T>
T max(T x, T y) {
  return x > y ? x : y;
}
template <typename T>
T abs(T x) {
  return x > 0 ? x : -x;
}
template <typename T>
T gcd(T x, T y) {
  return x ? gcd(y % x, x) : y;
}
int main() {
  int n, s;
  while (~scanf("%d %d", &n, &s)) {
    int ans = -1, maxn = 0;
    for (int i = 1, d, f; i <= n; i++) {
      scanf("%d %d", &d, &f);
      if ((d == s && f == 0) || (d < s)) {
        if (d != s && f != 0)
          ans = 100 - f;
        else
          ans = 0;
        if (ans > maxn) maxn = ans;
      }
    }
    if (ans == -1)
      printf("-1\n");
    else
      printf("%d\n", maxn);
  }
}
