#include <bits/stdc++.h>
using namespace std;
int n, m, x, y, ans = -1;
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x + 1 <= m && y) {
      ans = max(ans, 100 - y);
    }
    if (x <= m && !y) ans = max(ans, 0);
  }
  cout << ans << endl;
}
