#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  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 (y != 0) {
        ans = max(ans, 100 - y);
      } else {
        ans = max(ans, 0);
      }
    } else if (x == s && y == 0) {
      ans = max(ans, 0);
    }
  }
  cout << ans << endl;
  return 0;
}
