#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, s;
  cin >> n >> s;
  int mx = 0;
  int flag = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x < s && y > 0) {
      mx = max(mx, 100 - y);
      flag = 1;
    } else if (x == s && y == 0) {
      flag = 1;
    } else if (x <= s && y == 0) {
      flag = 1;
    }
  }
  if (flag == 1)
    cout << mx << endl;
  else
    cout << -1 << endl;
  return 0;
}
