#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, x, y, mx = -1, sweet = -1, i;
  cin >> n >> s;
  for (i = 1; i <= n; i++) {
    cin >> x >> y;
    if (x < s) {
      if (y == 0) {
        sweet = 0;
      } else {
        sweet = 100 - y;
      }
    } else if (x == s && y == 0) {
      sweet = 0;
    }
    mx = mx > sweet ? mx : sweet;
  }
  cout << mx;
  return 0;
}
