#include <iostream>
#include <cmath>

using namespace std;
int br;
struct Tacka {
    int x, y;   };
int ori(const Tacka& t0, const Tacka& t1, const Tacka& t2) {
    long long d = (long long)(t1.x-t0.x)*(long long)(t2.y-t0.y) -
                  (long long)(t2.x-t0.x)*(long long)(t1.y-t0.y);
    if (d > 0)       return 1;
    else if (d < 0)      return -1;
    else      return 0; }

bool tackaUTrouglu(const Tacka& T,
                   const Tacka& A, const Tacka& B, const Tacka& C) {
  int o1 = ori(A, B, T);
  
  int o2 = ori(B, C, T);
  
  int o3 = ori(C, A, T);
  
  if(o1==0){
    br++;
    if(o2==0){
        br++;
        if(o3==0){
            br++; return true;
        }
        else return true;
        }
    else if(o3 ==0){
        br++;
        return true;}
    return o2==o3;
    }

    else if(o2 ==0){
        br++;
        if(o3==0){
            br++;return true;     
        }
        return o1==o3;

    }
    if(o3 == 0){
        br++; return o1==o2;
    }
  return o1 == o2 && o2 == o3;
}


int main() {
    ios_base::sync_with_stdio(false);  
cin.tie(NULL);
  int x, y;
   br=0;
  cin>>x;
  if(x != 3) {
    for(int i=0; i<x; i++){cin>>y>>y;}cout<<"0"; return 0;}
  Tacka p,  a, b, c;
  cin >> x >> y;
  a.x = x; a.y = y;
  if(x==0 && y==0)br++;
  cin >> x >> y;
  b.x = x; b.y = y;
  if(x==0 && y==0)br++;
  cin >> x >> y;
  c.x = x; c.y = y;
  if(x==0 && y==0)br++;
  p.x = 0; p.y =0;
  if (tackaUTrouglu(p, a, b, c))
    br++;
  cout<<br;
  return 0;
}