#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, a, b;
  cin >> n >> s;
  vector<int> arr1(n), arr2(n), arr;
  for (int x = 0; x < n; x++) cin >> arr1[x] >> arr2[x];
  for (int x = 0; x < n - 1; x++) {
    for (int y = x + 1; y < n; y++) {
      if (arr2[x] > arr2[y]) {
        swap(arr2[x], arr2[y]);
        swap(arr1[x], arr1[y]);
      }
    }
  }
  bool check1 = 0, check2 = 0;
  for (int x = 0; x < n; x++) {
    if (s > arr1[x]) {
      check1 = 1;
      break;
    } else if (s == arr1[x] && arr2[x] == 0) {
      check2 = 1;
      break;
    }
  }
  if (check1 == 0 && check2 == 0) {
    cout << -1;
    return 0;
  }
  for (int x = 0; x < n; x++) {
    if (s > arr1[x] && (100 - arr2[x]) != 100) {
      cout << 100 - arr2[x];
      return 0;
    }
  }
  cout << "0";
  return 0;
}
