#include <bits/stdc++.h>
#define ll long long
#define SZ(vvv) ((int)vvv.size())
#define all(vvv) (vvv.begin(), vvv.end())
#define fastIO cout << fixed << setprecision(6), ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
using namespace std;
const int N = 5e5 + 9, M = 1e2 + 3, MOD = 1e9 + 7, B = 31;
const ll INF = 1e15;

int x[N], y[N];

int dcmp(double a, double b) {
    if(fabs(a - b) <= 1e6)
        return 0;
    else if(a > b)
        return 1;
    else
        return -1;
}

void runtestcase() {
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i) {
        cin >> x[i] >> y[i];
    }
    int cnt = 0;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < i; ++j) {
            ll nem = (y[i] - y[j]);
            ll dem = (x[i] - x[j]);
            if(abs(nem) <= abs(dem))
                ++cnt;
        }
    }
    cout << cnt;
}

int main() {
#ifdef LOCAL
    //    freopen("input.in", "rt", stdin);
//    freopen("output.in", "wt", stdout);
#endif
    fastIO;
    int t = 1, tt = 1;
    //cin >> t;
    while(t--) {
        runtestcase();
        ++tt;
    }
}
#include<bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <string>
#include <chrono>
#include <complex>
using namespace std;
#define ll long long
#define ld long double
#define ui unsigned int
#define ull unsigned ll
#define mp                   make_pair
#define eb                   emplace_back
#define pb                   push_back
#define pf                   push_front
#define popb                 pop_back
#define popf                 pop_front
#define hashmap              unordered_map
#define hashset              unordered_set
#define lb                   lower_bound
#define ub                   upper_bound
#define all(a)               (a).begin(), (a).end()
#define rall(a)              (a).rbegin(), (a).rend()
#define ff                   first
#define ss                   second
#define foi(n) for(ll i=0;i<n;i++)
#define foj(n) for(ll j=0;j<n;j++)
#define fok(n) for(ll k=0;k<n;k++)
#define forr(i,a,b) for(ll i=a;i<b;i++)
#define forrr(i,b,a) for(ll i=b;i>=a;i--)
#define forrrr(i,a,b,k) for(ll i=a;i<b;i=i+k)
#define graph          vector<vector<int>>
#define sz(v) v.size()
typedef pair<int, int> pii;
typedef pair<ll, ll>   pll;
typedef vector<int>         vi;
typedef vector<ll>          vll;
typedef vector<string>      vs;
typedef vector<double>      vd;
typedef vector<pii>         vpii;
typedef vector<pll>         vpll;
typedef pair< ll, pll>      plll;
typedef vector<plll>      vplll;
typedef  vector<string> 	     vs;
typedef  vector<char>	         vc;
typedef  vector<bool>            vb;
typedef  map<string, int>         msi;
typedef  map<int, int>	         mii;
typedef  map<ll, ll>             mll;
typedef  map<char, int>           mci;
typedef  map<int, string>	     mis;
typedef  pair<string, int>       psi;
typedef  pair<string, string>    pss;
typedef priority_queue <ll> pq;
typedef priority_queue<pii, vector<pii>, greater<pii> > pqq;
const ll MOD = 1000000007;
void solve();
int main()
{
	ios_base::sync_with_stdio(false); cin.tie(NULL);

#ifndef ONLINE_JUDGE
	freopen("input1.txt", "r", stdin);
	freopen("error1.txt", "w", stderr);
	freopen("output1.txt", "w", stdout);
#endif


//	ll t ; cin >> t;
//	while (t--)
	{
		solve();
		cout << "\n";
	}

	cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
	return 0;
}
ll ceils(ll x, ll y) {
	return x / y + ((x % y) != 0);
}
ll gcd(ll a, ll b) {
	if (b == 0)
		return a;
	else
		return gcd(b, a % b);
}


ll lcm(ll a, ll b) {
	return a / gcd(a, b) * b;

}
void solve() {
	ll n;
	cin >> n;
	vpll x;
	foi(n) {
		ll x1, y;
		cin >> x1 >> y;
		x.pb(mp(x1, y));
	}
	ll ans = 0;
	foi(n - 1) {
		for (ll j = i + 1; j < n; j++) {
			if ((ld)(x[i].ss - x[j].ss) / (ld)(x[i].ff - x[j].ff) <= 1 and (ld)(x[i].ss - x[j].ss) / (ld)(x[i].ff - x[j].ff) >= -1)
				ans++;
		}
	}
	cout << ans;
}

