#include <bits/stdc++.h>
using namespace std;
int a[(int)(2e6 + 7)];
int n, s, ans, x, y, cnt;
bool flag = 0;
int main() {
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (y == 0 && x <= s) flag = 1;
    if (x + 1 <= s && y != 0) ans = max(ans, 100 - y), flag = 1;
  }
  if (flag)
    cout << ans;
  else
    cout << -1;
  return 0;
}
