#include<bits/stdc++.h>
#define For(i,l,r) for(int i=(l);i<=(r);i++)
#define ReFor(i,r,l) for(int i=(r);i>=(l);i--)
const int MAXN=1010;
using namespace std;
int n,ans;
struct llz
{
	int x,y;
}a[MAXN];
inline int read()
{
	int f=1,x=0;
	char ch=getchar();
	while(ch<'0' || ch>'9')
	{
		if(ch=='-')
			f=-1;
		ch=getchar();
	}
	while(ch>='0' && ch<='9')
	{
		x=(x<<3)+(x<<1)+ch-'0';
		ch=getchar();
	}
	return f*x;
}
int main()
{
	n=read();
	For(i,1,n)
	{
		a[i].x=read();
		a[i].y=read();
	}
	For(i,1,n-1)
	{
		For(j,i+1,n)
		{
			if(abs(a[j].y-a[i].y)<=abs(a[j].x-a[i].x))
				ans++;
		}
	}
	printf("%d",ans);
	return 0;
}
#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define pb push_back
#define yes cout <<"YES"<<endl
#define no cout <<"NO"<<endl
#define sortv(a) sort(a.begin(), a.end())
typedef vector <long long> vi;
typedef string str;
typedef vector <pair<long long, long long>> vip;
typedef pair <int, int> pi;
typedef set <int> si;
typedef vector <double> vd;

bool isPrime(ll n)
{
    if (n <= 1) return false;
    if (n <= 3) return true;
    if (n % 2 == 0 or n % 3 == 0) return false;
    for (int i = 5; i * i <= n; i += 6) {
        if (n % i == 0 or n % (i + 2) == 0) return false;
    }
    return true;
}

bool sortbysec(const pair<long long, long long> &a, const pair<long long, long long> &b)
{
    return (a.second > b.second);
}

bool isPalindromic(string s)
{
    for (int i = 0; i < s.size(); ++i) {
        if (s[i] != s[s.size() - i - 1]) {
            return false;
        }
    }
    return true;
}

void solve()
{
    ll n;
    cin >>n;
    vi x(n), y(n);
    for (int i = 0; i < n; ++i) {
        cin >>x[i]>>y[i];
    }
    ll cnt = 0;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < i; ++j) {
            double s = (double)(y[j] - y[i]) / (double)(x[j] - x[i]);
            if (s <= 1 and s >= -1) {
                cnt++;
            }
        }
    }
    cout <<cnt<<endl;
}

int main()
{
    solve();
}
