#include<bits/stdc++.h>
using namespace std;
#define forr(i,a,n)     for(long long int i=a; i<n; i++)
#define loop(i,a,n)     for(long long int i=a; i>=n; i--) 

int main()
{
	ios_base :: sync_with_stdio(false),cin.tie(NULL);

	int a;
	cin>>a;
	vector<pair<double,double>> v;
	forr(i, 0, a)
	{
		int x, y;
		cin>>x>>y;
		v.push_back({x, y});
	}
	int ans=0;
	forr(i, 0, a)
	{
		forr(j, i+1, a)
		{
			double d=(v[j].second-v[i].second)/(v[j].first-v[i].first);
			//cout<<v[i].first<<' '<<v[i].second<<' '<<v[j].first<<' '<<v[j].second<<' '<<d<<'\n';
			if(d>=-1.0 and d<=1.0)
				ans++;
		}
	}
	cout<<ans;
	
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;

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

    int ans = 0;
    for(int i=0; i<n; i++){
        for(int j=0; j<i; j++){
            int dx = abs(x[i] - x[j]);
            int dy = abs(y[i] - y[j]);

            if(dx >= dy) ans += 1;
        }        
    }
    cout << ans << endl;
    return 0;
}