#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, ans = -1;
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    if (a < s) {
      if (b != 0)
        ans = max(ans, 100 - b);
      else
        ans = max(ans, b);
    }
    if (a == s && b == 0) ans = max(ans, 0);
  }
  cout << ans;
  return 0;
}
