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