#include <iostream>
#include <vector>
#include <cmath>
using namespace std;

int main(int argc, char** argv) {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    
	int n;
	cin>>n;
	vector <pair<double,double> > a(n*(n-1)/2);
	double duz[n*(n-1)/2];
	double k[n*(n-1)/2];
	vector<pair<int, int> > tacke(n);

	
	for(int i=0; i < n; i++)
	{
		cin>> tacke[i].first;
		cin>> tacke[i].second;		
	}
	
	int s=0;
	int m=0;
	double q;
	for(int i=0; i<n-1; i++)
	{
		for(int j=i+1;j<n;j++)
		{
			if(j<n-1) {
				q=tacke[i].first*(tacke[j].second-tacke[j+1].second)+tacke[j].first*(tacke[j+1].second-tacke[i].second)+tacke[j+1].first*(tacke[i].second-tacke[j].second);
				if(q==0) m--;	
			}
				if((tacke[i].first-tacke[j].first)==0) a[s].first=1000;
				else a[s].first=double((tacke[i].second-tacke[j].second))/double((tacke[i].first-tacke[j].first));
		 		
		 		a[s].second=sqrt(pow(double(tacke[i].second-tacke[j].second),2)+pow(double(tacke[i].first-tacke[j].first),2));
		 		s++;	
		 		
		}
	}

	
	int br=0;
	for(int i=0; i<s-1;i++)
	{
		for(int j=i+1;j<s;j++)
		{
			if(a[i].first==a[j].first) {
				if(a[i].second==2*a[j].second) {
					br++;
				}
				else if(a[j].second=2*a[i].second) {
					br++;
					
				}
				
			}
		}
	}
	
	cout<<br+3*m;


	
	return 0;
}