#include <bits/stdc++.h>

using namespace std;
struct Tacka{
    int x,y;
    Tacka operator-(const Tacka& t ) const{
        Tacka res;
        res.x = x-t.x;
        res.y = y-t.y;
        return res;
    }
    bool operator==(const Tacka& t ) const{
        return (x==t.x&&y==t.y);
    }
};
int crossProduct(Tacka a, Tacka b){
    return a.x*b.y-a.y*b.x;
}
int pripadnostTrouglu(Tacka t, Tacka a, Tacka b, Tacka c){
    if(t==a||t==b||t==c){
        return 3;
    }
    int s = crossProduct(b-a,c-a);
    int s1 = crossProduct(a-t,b-t);
    int s2 = crossProduct(a-t,c-t);
    int s3 = crossProduct(c-t,b-t);
    if(abs(s)==abs(s1)+abs(s2)+abs(s3)){
        if(s1==0||s2==0||s3==0){
            return 2;
        }
        else{
            return 1;
        }
    }
    else{
        return 0;
    }
}
vector<Tacka> p;
int main()
{
    int n;
    cin>>n;
    for(int i = 0; i<n; i++){
        Tacka t;
        cin>>t.x>>t.y;
        p.push_back(t);
    }
    if(n==3){
        cout<<pripadnostTrouglu({0,0},p[0],p[1],p[2]);
    }
    return 0;
}