#include <bits/stdc++.h>
using namespace std;
int32_t n, s, ans = -1, x, y;
int main() {
  cin >> n >> s;
  while (n--) {
    cin >> x >> y;
    if (x < s || (x == s && !y)) ans = max(ans, !y ? 0 : 100 - y);
  }
  cout << ans << endl;
  return 0;
}
