#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
    int n;
    scanf("%d", &n);
    int x[n];
    int y[n];
    for(int i=0;i<n;i++)
    {
        scanf("%d %d", &x[i], &y[i]);
    }

    int brojac = 0;
    for(int i=0;i<n;i++)
    {
        for(int k=1;k<n;k++)
        {
            int duz1Ax = x[i];int duz1Bx = x[k];
            int duz1Ay = y[i];int duz1By = y[k];

            for(int j=i+1;j<n-1;j++)
            {
                int duz2Ax = x[j];int duz2Bx = x[j+1];
                int duz2Ay = y[j];int duz2By = y[j+1];

                int scope11 = duz1By - duz1Ay;
                int scope12 = duz1Bx - duz1Ax;
                float scope1;
                if(scope12 == 0)
                {
                    scope1 = (float)INT_MAX;
                }
                else
                {
                    scope1 = scope11/scope12;
                }

                int scope21 = duz2By - duz2Ay;
                int scope22 = duz2Bx - duz2Ax;
                float scope2;
                if(scope22 == 0)
                {
                    scope2 = (float) INT_MAX;
                }
                else
                {
                    scope2 = scope21/scope22;
                }

                if(scope1==scope2)
                {
                    //duzina paralalnih osnovica treba da bude u odnosnu 1:2!!!
                    float d1 = sqrt( (duz1Bx - duz1Ax) * (duz1Bx - duz1Ax) + (duz1By - duz1Ay)*(duz1By - duz1Ay) );
                    float d2 = sqrt( (duz2Bx - duz2Ax) * (duz2Bx - duz2Ax) + (duz2By - duz2Ay)*(duz2By - duz2Ay) );
                    if(d1/d2 == 2)
                    {
                        brojac++;
                    }
                    else if(d2/d1 == 2)
                    {
                        brojac++;
                    }
                }
            }
        }
    }
    printf("%d\n", brojac);
    return 0;
}