#include<cstdio>
#include<cmath>
#define Nmax 100010
#define Inf 1<<30
using namespace std;

const double e = 0.000001 ; 

struct punct { double x,y ; } ;
punct v[Nmax] ; 

double d1,d2,eroare,Distante[Nmax],D,A,B,C,X,Y;
int i,n,M,e1,e2,sus,jos,p1,p2,p,start,sol;


int next ( int x ) 
{
	if( x < n ) return x+1;
	return 1 ;
}

int prev ( int x ) 
{
	if( x > 1 ) return x-1 ; 
	return n ; 
}

int bsearch( double s, double d )
{
	double m = (s+d)/2.0f ;
	
	for( ; s <= D && D <= d ; m = (s+d)/2.0f ) 
	{
		eroare = m - D  ;
		if( eroare < 0 ) eroare *= (-1) ;
		if( eroare <= e ) return 1 ; 
		
		if( m < D ) s = m  ;
		else d = m ; 
	}	

	return 0 ; 
}

double dist ( double x1, double y1, double x2, double y2 )
{
	double dif1 = x2-x1;
	double dif2 = y2-y1;
	
	return sqrt(dif1*dif1 + dif2*dif2);
}

void dreapta( int i, int j, double &A, double &B, double &C ) 
{
	A = v[j].y - v[i].y ; 
	B = v[i].x - v[j].x ; 
	C = v[i].y * ( v[j].x - v[i].x ) - v[i].x * ( v[j].y - v[i].y ) ;
}
	
int main()
{
	freopen("monoton.in","r",stdin);
	freopen("monoton.out","w",stdout);
	
	scanf("%d %lf",&n,&D);
	
	X = Inf ;
	
	for( i = 1 ; i <= n ; i++ )
	{
		scanf("%lf %lf",&v[i].x,&v[i].y);
		if( X > v[i].x )
		{
			start = i ;
			X = v[i].x;
		}
	}
	
	sus = jos = start ;  M = 1 ;
	
	for( i = 1 ; i < n ; i++ )
	{
		p1 = prev(sus) ; 
		p2 = next(jos) ; 
		
		p = p1 ; 
		if( v[p1].x > v[p2].x ) p = p2 ; 
		
		if( p == p1 ) 
		{
			sus = p ; 
			dreapta(jos,p2,A,B,C);
			
			X = (double)v[p].x ; 
			Y = (C - A*X ) / B ; 
			
			Distante[++M] = dist(X,Y,v[p].x,v[p].y) ;
		}
		else
		{
			jos = p ; 
			if( v[p].x == v[p1].x ) continue ; 
			
			dreapta(sus,p1,A,B,C);
			
			X = v[p].x ; 
			Y = (C - A*X ) / B ; 
			
			Distante[++M] = dist(X,Y,v[p].x,v[p].y) ;
		}
	}
	
	M++; 
	
	for( i = 2 ; i <= M ; i++ )
	{
		d1 = Distante[i-1] ;
		d2 = Distante[i] ; 
		
		e1 = e2 = 0 ; 
		eroare = d1 - D  ;
		if( eroare < 0 ) eroare *= (-1) ;
		if( eroare <= e ) e1 = 1 ; 
		
		eroare = d2 - D  ;
		if( eroare < 0 ) eroare *= (-1) ;
		if( eroare <= e ) e2 = 1 ; 
		
		if( e1 && e2 ) 
		{
			printf("infinit\n");
			return 0 ; 
		}
		if( e1 ) 
		{
			sol++;
			continue ; 
		}
		if( e2 ) 
			continue ; 
		
		sol += bsearch(d1,d2);
	}
	
	printf("%d\n",sol);
	
	return 0 ;
}

