#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, a, b, mi, flag = 1;
  cin >> n >> s;
  mi = INT_MAX;
  while (n--) {
    cin >> a >> b;
    if (a < s && b < mi && b != 0) mi = b;
    if (a <= s && b == 0) flag = 0;
  }
  if (mi == INT_MAX && flag == 1)
    cout << -1 << endl;
  else if (mi == 0 || mi == INT_MAX)
    cout << 0 << endl;
  else {
    cout << 100 - mi << endl;
  }
  return 0;
}
