#include <cstdio>
#include <cmath>

#define NMAX 100050
#define INF 0x3f3f3f3f

struct punct {
	int x, y;
} P[NMAX];

int J[NMAX], S[NMAX], xmin, pmin, xmax, pmax, n, p, u, mid;
double d, a, b, c, x, y;

bool egal (double a, double b);
int cauta (int), monoton ();
double verticala (int), dist (double, double, double, double);
void impartire (), citire (), afisare ();

int main () {
	
	citire ();
	
	afisare ();
	
	return 0;
}

int monoton () {
	
	int sol = 0;
	double st, dr;
	
	impartire ();
	
	dr = verticala (1);
	if ((dr > d || egal (dr, d)) || (egal (-dr, d))) sol++;
	
	for (int i = 2; i <= J[0]; i++) {
		st = verticala (i - 1); dr = verticala (i);
		if (((st > d || egal (st, d)) && dr < d) || (st < d && (dr > d || egal (dr, d)))) sol++;
		else if ((egal (st, d) && egal (dr, d)) || (egal (-st, d) && egal (dr, d)) || (egal (st, d) && egal (-dr, d)) || (egal (-st, d) && egal (-dr, d))) return -1;
	}
	
	if (dr > 0) {
		if (dr > d || egal (dr, d)) sol++;
	} else if (-dr > d || egal (-dr, d)) sol++;
	
	return sol;
}

bool egal (double a, double b) {
	
	double c = a - b;
	if (c < 0) c = -c;
	
	if (c < 0.0000000001) return 1;
	return 0;
}

double dist (double a, double b, double c, double d) {
	
	return sqrt ((a - c) * (a - c) + (b - d) * (b - d));
}

double verticala (int i) {
	
	int poz = cauta (J[i]);
	double x1, y1, x2, y2;
	
	x1 = P[ S[poz] ].x, y1 = P[ S[poz] ].y; x2 = P[ S[poz + 1] ].x, y2 = P[ S[poz + 1] ].y;
	a = y2 - y1, b = x1 - x2, c = x1 * (y1 - y2) + y1 * (x2 - x1);
	
	x = P[ J[i] ].x, y = (-a * x - c) / b;
	
	if (x1 == P[ J[i] ].x) return -dist (P[ J[i] ].x, P[ J[i] ].y, x, y);
	return dist (P[ J[i] ].x, P[ J[i] ].y, x, y);
}

int cauta (int a) {
	
	int sol = 1;
	
	p = 1, u = S[0];
	while (p <= u) {
		mid = (p + u) >> 1;
		if (P[ S[mid] ].x > P[a].x)
			u = mid - 1;
		else
			p = mid + 1, sol = mid;
	}
	
	return sol;
}

void impartire () {
	
	int i, f;
	
	i = pmin + 1; if (i > n) i = 1;
	for (; i != pmax; i++) {
		if (i > n) i = 1;
		J[ ++J[0] ] = i;
	}
	
	f = pmax - 1; if (f < 1) f = n;
	for (i = pmin; i != f; i--) {
		if (i < 1) i = n;
		S[ ++S[0] ] = i;
	}
}

void citire () {
	
	freopen ("monoton.in", "r", stdin);
	
	scanf ("%d %lf", &n, &d);
	
	xmin = INF, xmax = -INF;
	for (int i = 1; i <= n; i++) {
		scanf ("%d %d", &P[i].x, &P[i].y);
		if (P[i].x < xmin) xmin = P[i].x, pmin = i;
		if (P[i].x >= xmax) xmax = P[i].x, pmax = i;
	}
}

void afisare () {
	
	freopen ("monoton.out", "w", stdout);
	
	int sol = monoton ();
	if (sol != -1) printf ("%d", sol);
	else printf ("infinit");
}