#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, s;
  cin >> n >> s;
  long long i, max = -1;
  pair<long long, long long> p[n];
  for (i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    p[i].first = a;
    p[i].second = b;
  }
  sort(p, p + n);
  for (i = 0; i < n && s > p[i].first; i++) {
    if (max < 100 - p[i].second && p[i].second != 0) {
      max = 100 - p[i].second;
    }
    if (p[i].second == 0 && p[i].second > max) max = 0;
  }
  if (s == p[i].first && p[i].second == 0 && max == -1) max = 0;
  cout << max;
  return 0;
}
