using System;
class HelloWorld 
{
    static double povrsina(int x1, int y1, int x2, int y2, int x3, int y3)
    {
        return Math.Abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2.0);
    }
    
    static void Main() 
    {
        int n = int.Parse(Console.ReadLine());
        int[] x = new int[n];
        int[] y = new int[n];
        int br = 0;
        for(int i = 0; i < n; i++)
        {
            string[] s = Console.ReadLine().Split(' ');
            x[i] = int.Parse(s[0]);
            y[i] = int.Parse(s[1]);
        }
        
        for(int i = 0; i < n-1; i++)
        {
            for(int j = i+1; j < n; j++)
            {
                if(Math.Sqrt((x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j])) == Math.Sqrt(x[i]*x[i] + y[i]*y[i]) + Math.Sqrt(x[j]*x[j] + y[j]*y[j]))
                {
                    br++;
                }
            }
        }
        
        double p = povrsina(x[0], y[0], x[1], y[1], x[2], y[2]);
        double p1 = povrsina(0, 0, x[1], y[1], x[2], y[2]);
        double p2 = povrsina(x[0], y[0], 0, 0, x[2], y[2]);
        double p3 = povrsina(x[0], y[0], x[1], y[1], 0, 0);
        if(p == p1+p2+p3)
        {
            br++;
        }
        
        Console.WriteLine(br);
    }
}