#include <bits/stdc++.h>
using namespace std;
int main() {
  bool zero = false;
  int x, y;
  int n, s;
  cin >> n >> s;
  int mn = 100;
  for (int i = 0; i < n; ++i) {
    cin >> x >> y;
    if (s * 100 >= x * 100 + y) {
      if (y == 0) {
        zero = true;
        continue;
      }
      mn = min(y, mn);
    }
  }
  if (mn != 100) {
    cout << 100 - mn << endl;
  } else {
    if (zero) {
      cout << 0 << endl;
    } else {
      cout << -1 << endl;
    }
  }
  return 0;
}
