#include <bits/stdc++.h>
using namespace std;
const long long inf = 13e9;
const long long dd = 1e6 + 7;
int main() {
  int n, s, r = -1;
  cin >> n >> s;
  s *= 100;
  for (int i = 0; i < (long long)n; i++) {
    int x, y;
    cin >> x >> y;
    x = x * 100 + y;
    if (x <= s) r = max((100 - y) % 100, r);
  }
  cout << r;
}
