#include <vector>
#include <cmath>
#include <cstdio>

using namespace std;

const char iname[] = "monoton.in";
const char oname[] = "monoton.out";
const long double eps = 1e-18;
const int buffer = 4098;

inline int cmp(long double a, long double b) {
	if (a + eps < b)
		return -1;
	if (b + eps < a)
		return 1;
	return 0;
}

struct punct {
	long double x;
	long double y;

	bool operator<(const punct &a) const {
		return x < a.x;
	}
	punct(): x(0), y(0) {}
	punct(long double _x, long double _y): x(_x), y(_y) {}
};

int area(const punct &a, const punct &b, const punct &c) {
	return cmp(a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y), 0);
}

punct intersect(const punct &a, const punct &b, const punct &c, const punct &d) {
	long double mul = (a.x - b.x) / (c.x - d.x);
	long double X = a.x * b.y - a.y * b.x - c.x * d.y * mul + c.y * d.x * mul;
	X /= b.y - a.y - (d.y - c.y) * mul;
	long double Y = a.x * b.y - a.y * b.x - X * (b.y - a.y);
	Y /= (a.x - b.x);
	return punct(X, Y);
}

inline long double dis(const punct &a, const punct &b) {
	return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}

punct calc(const punct &a, const punct &b, long double &c) {
	long double raport = (c - a.x) / (b.x - a.x);

	//fprintf(stderr, "   -> (%.4Lf %.4Lf) si (%.4Lf %.4Lf) si %.4Lf genereaza %.4Lf\n", a.x, a.y, b.x, b.y, c, raport);;

	return punct(raport * b.x - raport * a.x + a.x, raport * b.y - raport * a.y + a.y);
}

void afis(vector<punct> &ceva) {
	for (vector<punct>::iterator it = ceva.begin(); it != ceva.end(); ++it) 
		fprintf(stderr, "(%.4Lf, %.4Lf)   ", it -> x, it -> y);
	fprintf(stderr, "\n");
}

char s[buffer];
int p = buffer - 1;

void cit(int &x) {
	x = 0;
	while ((s[p] < '0' || s[p] > '9') && s[p] != '-')
		if (++p == buffer)
			fread(s, 1, buffer, stdin), p = 0;
	
	int minus = 1;
	if (s[p] == '-') {
		minus = -1;
		if (++p == buffer)
			fread(s, 1, buffer, stdin), p = 0;
	}

	while (s[p] >= '0' && s[p] <= '9') {
		x = x * 10 + s[p] - '0';
		if (++p == buffer)
			fread(s, 1, buffer, stdin), p =0;
	}
	x *= minus;
}

int main() {
	freopen(iname, "r", stdin);
	freopen(oname, "w", stdout);

	int N, Dprim; cit(N); cit(Dprim);

	vector<punct> a(N), list1, list2, top, bottom;

	punct start(1e20, 1e20), finish(-1e20, -1e20); 
	int pozstart = N, pozfinish = N;
	for (int i = 0; i < N; ++i) {
		int x, y; cit(x); cit(y); a[i].x = x; a[i].y = y;
		if (a[i] < start)
			start = a[i], pozstart = i;
		if (finish < a[i])
			finish = a[i], pozfinish = i;
	}
	
	for (int i = pozstart; i != pozfinish; ++i) {
		list1.push_back(a[i]);
		if (i == N - 1)
			i = -1;
	}

	for (int i = pozstart; i != pozfinish; --i) {
		list2.push_back(a[i]);
		if (i == 0)
			i = N;
	}

	list1.push_back(finish); list2.push_back(finish);
	
	//afis(list1);
	//afis(list2);
	//fprintf(stderr, "\n");

	size_t i = 0, j = 0;
	top.push_back(start);
	bottom.push_back(start);

	while (i < list1.size() - 1 && j < list2.size() - 1) {
		if (area(list1[i], list1[i + 1], list2[j]) * area(list1[i], list1[i + 1], list2[j + 1]) == -1 && area(list2[j], list2[j + 1], list1[i]) * area(list2[j], list2[j + 1], list1[i + 1]) == -1) {
			swap(top, bottom);
            punct X = intersect(list1[i], list1[i + 1], list2[j], list2[j + 1]);

			top.push_back(X);
			bottom.push_back(X);
			list1[i] = list2[j] = X;
		}

		if (list1[i + 1] < list2[j + 1])
			top.push_back(list1[++i]);
		else
			bottom.push_back(list2[++j]);
	}

    top.push_back(finish);

	//fprintf(stderr, "%d\n", top.size()); afis(top);
	//fprintf(stderr, "%d\n", bottom.size());afis(bottom);

	i = 0; j = 0;
	punct last = start;

	int answer = 0;

	while (i < top.size() - 1 && j < bottom.size() - 1) {
		//fprintf(stderr, "%d %d -> \n", i, j);

		if (top[i + 1] < bottom[j + 1]) {
			if (cmp(last.x, top[i + 1].x) == 0) {
				++i;
				continue;
			}
			punct A = calc(top[i], top[i + 1], last.x);
			punct B = calc(bottom[j], bottom[j + 1], last.x);
			punct C = top[i + 1];
			punct D = calc(bottom[j], bottom[j + 1], top[i + 1].x);
			long double dis1 = dis(A, B); long double dis2 = dis(C, D);

		    //fprintf(stderr, "%.4Lf %.4Lf\n", dis1, dis2);
		    //fprintf(stderr, "-> (%.4Lf, %.4Lf) (%.4Lf, %.4Lf) si (%.4Lf, %.4Lf) (%.4Lf %.4Lf)\n\n", A.x, A.y, B.x, B.y, C.x, C.y, D.x, D.y);

			int x = cmp(dis1, Dprim), y = cmp(dis2, Dprim);
			if (x == 0 && y == 0) {
				printf("infinit\n");
				return 0;
			}
			if (y != 0)
				if (x != y)
					++answer;
			++i;
			last = top[i];
			continue;
		}
		
		if (cmp(last.x, bottom[j + 1].x) == 0) {
			++j;
			continue;
		}
		punct A = calc(top[i], top[i + 1], last.x);
		punct B = calc(bottom[j], bottom[j + 1], last.x);
		punct C = calc(top[i], top[i + 1], bottom[j + 1].x);
		punct D = bottom[j + 1];
		
		//fprintf(stderr, "%.4Lf %.4Lf\n", dis(A, B), dis(C, D));

		int x = cmp(dis(A, B), Dprim), y = cmp(dis(C, D), Dprim);
		if (x == 0 && y == 0) {
			printf("infinit\n");
			return 0;
		}
		if (y != 0)
			if (x != y)
				++answer;
		++j;
		last = bottom[j];
	}

	printf("%d\n", answer);
}
