#include<iostream>
#include<bits/stdc++.h>

using namespace std;
	

int main(){
	int N;
	cin >> N;
	int xk[100000], yk[100000];
	for(int i = 0; i < N; i++){
		cin >> xk[i] >> yk[i];
	}
	bool moze1 = false, moze2 = false;
	int xA = xk[0], yA = yk[0], xB = xk[1], yB = yk[1], xC = xk[2], yC = yk[2];
	double k1, k2, n_pravo;
	int resenje = 0;
	if(xA == xB){
		k1 = (yA*1.0)/xA;
		k2 = (yB*1.0)/xB;
		if(k1 != (yB-yC)*1.0/(xB-xC)){
			double k = (yB-yC)*1.0/(xB-xC);
			double n = yC - xC * k;
			n_pravo = n;
			if((xB < (n/(k1 - k)) && xC > (n/(k1 - k)))||(xC < (n/(k1 - k)) && xB > (n/(k1 - k)))){
				moze1 = true;
			}
		}
		if(k2 != (yA-yC)*1.0/(xA-xC)){
			double k = (yA-yC)*1.0/(xA-xC);
			double n = yC - xC * k;
			if((xA < (n/(k1 - k)) && xC > (n/(k1 - k)))||(xC < (n/(k1 - k)) && xA > (n/(k1 - k)))){
				moze2 = true;
			}
		}
		if(moze1 && moze2){
			if(n_pravo == 0){
				resenje = 2;
			} else resenje = 1;
		}	
	} else if(xC == xB){
		k1 = (yC*1.0)/xC;
		k2 = (yB*1.0)/xB;
		if(k1 != (yB-yA)*1.0/(xB-xA)){
			double k = (yB-yA)*1.0/(xB-xA);
			double n = yA - xA * k;
			n_pravo = n;
			if((xB < (n/(k1 - k)) && xA > (n/(k1 - k)))||(xA < (n/(k1 - k)) && xB > (n/(k1 - k)))){
				moze1 = true;
			}
		}
		if(k2 != (yC-yA)*1.0/(xC-xA)){
			double k = (yC-yA)*1.0/(xC-xA);
			double n = yA - xA * k;
			if((xC < (n/(k1 - k)) && xA > (n/(k1 - k)))||(xA < (n/(k1 - k)) && xC > (n/(k1 - k)))){
				moze2 = true;
			}
		}
		if(moze1 && moze2){
			if(n_pravo == 0){
				resenje = 2;
			} else resenje = 1;
		}	
	} else{
		k1 = (yC*1.0)/xC;
		k2 = (yA*1.0)/xA;
		if(k1 != (yB-yA)*1.0/(xB-xA)){
			double k = (yB-yA)*1.0/(xB-xA);
			double n = yB - xB * k;
			n_pravo = n;
			if((xB < (n/(k1 - k)) && xA > (n/(k1 - k)))||(xA < (n/(k1 - k)) && xB > (n/(k1 - k)))){
				moze1 = true;
			}
		}
		if(k2 != (yC-yB)*1.0/(xC-xB)){
			double k = (yC-yB)*1.0/(xC-xB);
			double n = yB - xB * k;
			if((xC < (n/(k1 - k)) && xB > (n/(k1 - k)))||(xB < (n/(k1 - k)) && xC > (n/(k1 - k)))){
				moze2 = true;
			}
		}
		if(moze1 && moze2){
			if(n_pravo == 0){
				resenje = 2;
			} else resenje = 1;
		}	
	}
	cout << resenje;
    return 0;
}