#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  cin >> n >> s;
  int ans = -1;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    if (x <= s) {
      if (x == s && y > 0) continue;
      int change = 0;
      if (y > 0) {
        change = 100 - y;
      }
      if (change > ans) ans = change;
    }
  }
  cout << ans << endl;
  return 0;
}
