#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)111;
;
int n, s, num[maxn], val[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    cin >> num[i] >> val[i];
  }
  int mn = -1, v = 0, c = 0;
  for (int i = 0; i < n; i++) {
    v = num[i];
    c = val[i];
    if (v * 100 + c <= s * 100)
      if (c)
        mn = max(mn, 100 - c);
      else
        mn = max(mn, 0);
  }
  cout << mn;
}
