using System;
class HelloWorld
{
    static double P_trougla(double ax, double ay, double bx, double by, double cx, double cy)
    {
        double a = Math.Sqrt((bx-cx)*(bx-cx) + (by-cy)*(by-cy));
        double b = Math.Sqrt((ax-cx)*(ax-cx) + (ay-cy)*(ay-cy));
        double c = Math.Sqrt((bx-ax)*(bx-ax) + (by-ay)*(by-ay));
        double s = (a+b+c)/2;
        double Pabc = Math.Sqrt(s*(s-a)*(s-b)*(s-c));
        return Pabc;
    }
    
    static bool na_duzi(double x1, double y1, double x2, double y2, double x3, double y3) //da li se 3 nalazi izmedju 1 i 2
    {
        double duzina = Math.Sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
        double duzina1 = Math.Sqrt((x1-x3)*(x1-x3) + (y1-y3)*(y1-y3));
        double duzina2 = Math.Sqrt((x3-x2)*(x3-x2) + (y3-y2)*(y3-y2));
        if((x1 == x3 && y1 == y3) || (x2 == x3 && y2 == y3))
        {
            return true;
        }
        else
        {
            if(x1!=x2)
            {
                if(x2!=x3)
                {
                    if((y1-y2)/(x1-x2) == (y2-y3)/(x2-x3) && (duzina >= duzina1 && duzina >= duzina2))
                    {
                        return true;
                    }
                }
                else
                {
                    return false;
                }
            }
            else
            {
                if(x2==x3 && (duzina >= duzina1 && duzina >= duzina2))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }
        return false;
    }
    
    static void Main()
    {
        long N = long.Parse(Console.ReadLine());
        long br = 0;
        if(N==3)
        {
            string [] ulaz = Console.ReadLine().Split(' ');
            double ax = double.Parse(ulaz[0]);
            double ay = double.Parse(ulaz[1]);
            
            ulaz = Console.ReadLine().Split(' ');
            double bx = double.Parse(ulaz[0]);
            double by = double.Parse(ulaz[1]);
            
            ulaz = Console.ReadLine().Split(' ');
            double cx = double.Parse(ulaz[0]);
            double cy = double.Parse(ulaz[1]);
            
            //duzi
            if(na_duzi(ax, ay, bx, by, 0, 0))
            {
                br++;
            }
            if(na_duzi(ax, ay, cx, cy, 0, 0))
            {
                br++;
            }
            if(na_duzi(bx, by, cx, cy, 0, 0))
            {
                br++;
            }
            
            //u truglu
            if(ax == 0 && bx == 0 && cx == 0)
            {
                double min = ay, max = ay;
                if(by < min)
                {
                    min = by;
                }
                if(by > max)
                {
                    max = by;
                }
                if(cy > max)
                {
                    max = cy;
                }
                if(cy < min)
                {
                    min = cy;
                }
                if(min<=0 && 0<=max)
                {
                    br++;
                }
            }
            else if (ay == 0 && by == 0 && cy == 0)
            {
                double min = ax, max = ax;
                if(bx < min)
                {
                    min = bx;
                }
                if(bx > max)
                {
                    max = bx;
                }
                if(cx > max)
                {
                    max = cx;
                }
                if(cx < min)
                {
                    min = cx;
                }
                if(min<=0 && 0<=max)
                {
                    br++;
                }
            }
            else
            {
                double Pabc = P_trougla(ax, ay, bx, by, cx, cy);
                double P1 = P_trougla(ax, ay, bx, by, 0, 0);
                double P2 = P_trougla(ax, ay, cx, cy, 0, 0);
                double P3 = P_trougla(bx, by, cx, cy, 0, 0);
                if(Math.Round(Pabc, 5) == Math.Round((P1 + P2 + P3), 5))
                {
                    br++;
                }
            }
        }
        Console.WriteLine(br);
    }
}