#include <bits/stdc++.h>
using namespace std;
int n, s;
int res;
void Init() {
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  cin >> n >> s;
  res = -1;
}
void Solve() {
  int x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (s >= x + (y + 99) / 100) {
      if (y == 0) y = 100;
      res = max(res, 100 - y);
    }
  }
  cout << res;
}
int main() {
  Init();
  Solve();
}
