uses
  Math;

const
  maxn = 100000;
  eps = 1e-9;

var
  ans, t, n, d, i, j, x1, x2, y1, y2, x3, x4, y3, y4, xl, xr, ir, il : integer;
  x, y : array[1..maxn] of integer;
  yl1, yl2, yr1, yr2, dl, dr : double;

begin
  assign(input, 'ring.in');
  reset(input);
  assign(output, 'ring.out');
  rewrite(output);
  read(n, d);
  for i := 1 to n do begin
    read(x[i], y[i]);
  end;
  ans := 0;
  il := 1;
  ir := 1;
  for i := 2 to n do begin
    if (x[i] < x[il]) then
      il := i;
    if (x[i] > x[ir]) then
      ir := i;
  end;

  i := il;
  while (i <> ir) do begin
    x1 := x[i];
    x2 := x[i mod n + 1];
    i := i mod n + 1;
  end;
  i := il;
  while (i <> ir) do begin
    x1 := x[i];
    x2 := x[(i + n - 2) mod n + 1];
    i := (i + n - 2) mod n + 1;
  end;

  i := il;
  j := il;
  while (i <> ir) and (j <> ir) do begin
    x1 := x[i];
    y1 := y[i];
    x2 := x[i mod n + 1];
    y2 := y[i mod n + 1];
    x3 := x[j];
    y3 := y[j];
    x4 := x[(j + n - 2) mod n + 1];
    y4 := y[(j + n - 2) mod n + 1];

    xl := max(x1, x3);
    xr := min(x2, x4);
    if (xl < xr) then begin
      yl1 := 1.0 * (xl - x1) * (y2 - y1) / (x2 - x1) + y1;
      yl2 := 1.0 * (xl - x3) * (y4 - y3) / (x4 - x3) + y3;
      yr1 := 1.0 * (xr - x1) * (y2 - y1) / (x2 - x1) + y1;
      yr2 := 1.0 * (xr - x3) * (y4 - y3) / (x4 - x3) + y3;
      dl := abs(yl2 - yl1);
      dr := abs(yr2 - yr1);
      if (abs(dl - d) < eps) and (abs(dr - d) < eps) then begin
        writeln('Infinity');
        halt;
      end;
      if (dl < d - eps) and (dr >= d - eps) then begin
        ans := ans + 1;
      end;
      if (dl > d + eps) and (dr <= d + eps) then begin
        ans := ans + 1;
      end;
    end;

    if (x2 < x4) then begin
      i := i mod n + 1;
    end else begin
      j := (j + n - 2) mod n + 1;
    end;
  end;
  writeln(ans);
end.