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

using namespace std;

struct tacka {
    int x, y;
};

bool pripada_trouglu(tacka a, tacka b, tacka c)
{
    int ans = a.x*(b.y-c.y)+b.x*(a.y-c.y)+c.x*(a.y-b.y);
    return !ans;
}
bool pripada_pravoj(tacka a, tacka b)
{
    complex<int> a1(b.x, b.y);
    complex<int> b1(a.x, a.y);

    complex<int> c(0, 0);

    complex<int> p = c-a1;
    complex<int>p2 = c-b1;
    int ans = (conj(p)*p2).imag();
    return !ans;
}
bool is_zero(tacka a)
{
    return a.x==0 && a.y==0;
}

int main()
{
    int n;cin>>n;
    vector<tacka>tacke(n);
    for(int i = 0; i<n; i++)
    {
        int a, b;cin>>a>>b;
        tacke[i]={a, b};
    }

    if(n==3)
    {
        int ans=0;
        if(pripada_trouglu(tacke[0], tacke[1], tacke[2]))ans++;
        if(pripada_pravoj(tacke[0], tacke[1]))ans++;
        if(pripada_pravoj(tacke[1], tacke[2]))ans++;
        if(pripada_pravoj(tacke[0], tacke[2]))ans++;
        if(is_zero(tacke[0]))ans++;
        if(is_zero(tacke[1]))ans++;
        if(is_zero(tacke[2]))ans++;
        cout<<ans;

    }


    return 0;
}