#include <bits/stdc++.h>
using namespace std;
int main() {
  int res = -1;
  int y, x, n, s;
  cin >> n >> s;
  bool can = false;
  while (n--) {
    cin >> x >> y;
    if (x < s || (x == s && y == 0)) {
      can = true;
      if (x < s && y != 0 && 100 - y > res) res = 100 - y;
    }
  }
  if (res == -1 && !can)
    cout << -1;
  else if (res == -1 && can)
    cout << 0;
  else
    cout << res;
}
