#include<stdio.h>
#include<strings.h>
#include<math.h>
int main(void){
	
	double d;
	int x, y, i, a, x1 = 0, y1 = 0, p = 0;
	
	scanf("%d", &a);
	
	for(i = 0; i<a; i++){
		
		x1 = x;
		y1 = y;
		
		scanf("%d%d", &x, &y);
		if(x1 == 0 && y1 == 0);
			else{
				d = (double)sqrt(pow(x-x1, 2) + pow(y-y1, 2));
				if(d > 2*(x+y)) p++;
			}
		
		
	
		
		
	}
	
	printf("%d", p-1);
	
	
	return 0;
}