#include <bits/stdc++.h>
using namespace std;
const long long MX = 3e5 + 9;
const long double pi = acos(-1);
const long long mod = 1e9 + 7;
bool cmp(int a, int b) { return a > b; }
long long po(long long a, long long b) {
  if (b == 0) {
    return 1;
  }
  long long x = po(a, b / 2);
  x *= x % mod;
  if (b % 2) {
    x *= a % mod;
  }
  return x % mod;
}
int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
int main() {
  int n, s;
  cin >> n >> s;
  int ans = 0;
  bool ok = 0;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    if (s >= a) {
      if (s == a) {
        if (b != 0) {
          continue;
        } else {
          ok = 1;
        }
      }
      ok = 1;
      if (b != 0) ans = max(ans, 100 - b);
    }
  }
  if (!ok) {
    ans = -1;
  }
  cout << ans;
  return 0;
}
