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