#include <bits/stdc++.h>
using namespace std;
int n, s, mx = -1;
int a, b;
int main() {
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    if (a <= s && b == 0) mx = max(mx, 0);
    if (a < s && b > 0) mx = max(mx, 100 - b);
  }
  cout << mx << endl;
}
