#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  scanf("%d%d", &n, &s);
  int ma = -1;
  for (int i = 0; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    for (int j = 1; j <= 1; j++) {
      int c, d;
      c = j * a;
      d = b * j;
      c += d / 100;
      d %= 100;
      if (c * 100 + d > s * 100) break;
      if (d == 0)
        ma = max(ma, 0);
      else
        ma = max(ma, 100 - d);
    }
  }
  printf("%d\n", ma);
}
