#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>

using namespace std;

float roundDecimal(float value, unsigned char brojDecimalnihMesta)
{
  float koeficijent = pow(10.0f, (float)brojDecimalnihMesta);
  return round(value * koeficijent) / koeficijent;
}


int main()
{
	int n;
	cin>>n;
	vector<int> x(n),y(n);
	int s = 0;

	
	
	for(int i = 0; i < n; i++)
	{
		cin>>x[i]>>y[i];	
	}
	

	
	for(int i = 0; i < n - 3; i++)
	{
		int x1 = x[i];
		int y1 = y[i];
		for(int j = i + 1; j < n - 2; j++)
		{
			int x2 = x[j];
			int y2 = y[j];
			for(int k = j + 1; k < n - 1; k++)
			{
				int x3 = x[k];
				int y3 = y[k];
				for(int l = k + 1; l < n; l++)
				{
					int x4 = x[l];
					int y4 = y[l];
					
					
					double k1 = (double)(y2 - y1) / (double)(x2 - x1);
					double k2 = (double)(y3 - y2) / (double)(x3 - x2);
					double k3 = (double)(y4 - y3) / (double)(x4 - x3);
					double k4 = (double)(y1 - y4) / (double)(x1 - x4);
					
				/*	cout<<"k1 = "<<k1<<endl;
					cout<<"k2 = "<<k2<<endl;
					cout<<"k3 = "<<k3<<endl;
					cout<<"k4 = "<<k4<<endl;*/
					
					double d1 = sqrt((double)(x2 - x1) * (x2 - x1) + (double)(y2 - y1) * (y2 - y1));
					double d2 = sqrt((double)(x3 - x2) * (x3 - x2) + (double)(y3 - y2) * (y3 - y2));
					double d3 = sqrt((double)(x4 - x3) * (x4 - x3) + (double)(y4 - y3) * (y4 - y3));
					double d4 = sqrt((double)(x1 - x4) * (x1 - x4) + (double)(y1 - y4) * (y1 - y4));
					
				/*	cout<<"d1 = "<<d1<<endl;
					cout<<"d2 = "<<d2<<endl;
					cout<<"d3 = "<<d3<<endl;
					cout<<"d4 = "<<d4<<endl;*/

					if(k1 == k2 && (roundDecimal(d1 / d2,1)== 2 || roundDecimal(d2 / d1,1) == 2))
					{
						s++;
					}
					if(k1 == k3 && (roundDecimal(d1 / d3,1) == 2 || roundDecimal(d3 / d1,1) == 2))
					{
						s++;
					}
					if(k1 == k4 && (roundDecimal(d1 / d4,1)== 2 || roundDecimal(d4 / d1,1) == 2))
					{
						s++;
				
					}
					else if(k2 == k3 && (roundDecimal(d2 / d3,1)== 2 || roundDecimal(d3 / d2,1) == 2))
					{
						s++;
					}
					else if(k2 == k4 && (roundDecimal(d2 / d4,1)== 2 || roundDecimal(d4 / d2,1) == 2))
					{
						s++;
					}
					else if(k3 == k4 && (roundDecimal(d3 / d4,1)== 2 || roundDecimal(d4 / d3,1) == 2))
					{
						s++;
					}
					else if(k4 == k1 && (roundDecimal(d4 / d1,1)== 2 || roundDecimal(d1 / d4,1) == 2))
					{
						s++;
					}
					
				
				}
			}
		}
	}
	
	x.clear();
	y.clear();
	
	cout<<s;
	
	return 0;
}