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