#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:36777216")
using namespace std;
const int N = 1e5 + 7;
const int INF = 0x3fffffff;
const int MOD = 1e9 + 7;
const double EPS = 1e-8;
int n, m, x, y, mx = -1;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    if (m > x) {
      if (y != 0)
        mx = max(mx, 100 - y);
      else
        mx = max(mx, 0);
    }
    if (x == m && y == 0) mx = max(mx, 0);
  }
  cout << mx << endl;
}
