#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000 * 1000 * 1000 + 7;
const int MAXN = 100 + 10;
int n, s;
vector<int> vec;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int mx = -1;
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x <= s) {
      if (y == 0)
        mx = max(mx, 0);
      else if (x != s)
        mx = max(mx, 100 - y);
    }
  }
  return cout << mx << endl, 0;
  return 0;
}
