#include <bits/stdc++.h>
using namespace std;
static const auto fast = []() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  return nullptr;
}();
void solve() {
  long long n, s, mx = INT_MIN;
  cin >> n >> s;
  while (n) {
    long long d, c;
    cin >> d >> c;
    if (d < s) {
      c != 0 ? (mx = max(100 - c, mx)) : (mx = max((long long)0, mx));
    } else if ((d == s) && (c == 0)) {
      mx = max(mx, (long long)0);
    }
    n--;
  }
  (mx == INT_MIN) ? cout << -1 : cout << mx;
  return;
}
int32_t main() {
  solve();
  return 0;
}
