/*  Author: Tarun Kumar
    E-mail: tarunkumar281200@gmail.com

    " A code is like love,
        it has created with clear intentions at the beginning,
            but it can get complicated:) "
*/#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long int
#define ld long double
#define vll vector<ll>
#define vvll vector<vector<ll>>
#define vpll vector<pair<ll,ll>>
#define prqueue priority_queue<ll,vector<ll>,greater<ll>>// top=small
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#define f0(i,n) for(i=0;i<n;i++)
#define f1(i,n) for(i=1;i<=n;i++)
#define fab(i,a,b) for(i=a;i<=b;i++)
#define f0r(i,n) for(i=n-1;i>=0;i--)
#define f1r(i,n) for(i=n;i>=1;i--)
#define fabr(i,a,b) for(i=b;i>=a;i--)
#define memo(a,b) memset(a,b,sizeof(a))
#define display(x) {for(auto dsp:x)cout<<dsp<<" ";cout<<"\n";}
#define hi cout<<"hi\n"
#define ln "\n"
using namespace std;
const ld pi=acos(-1);const ll mod=1e9+7;

int main()
{FAST;ll t,n,i,j,k,len,x,y,z,c,f,flag,p,q,mx,mn,l,r,sum,ans,tmp,it,pos,avg,m,cnt;
    string s;char ch;vll v;vpll vec;unordered_map<ll,ll> mappu;pair<ll,ll> pr;
    t=1;
    // cin>>t;while(t--)
    {
        f=0;sum=0;flag=0;ans=0;cnt=0;v.clear();mappu.clear();vec.clear();
        cin>>n;
        ll a[n],b[n];
        f0(i,n)
        {
            cin>>a[i]>>b[i];
        }
        
        f0(i,n)
        {
            fab(j,i+1,n-1)
            {
                x=a[j]-a[i];
                y=b[j]-b[i];
                ld pp=(ld)y/(ld)x;
                if(pp<=1&&pp>=-1) ans++;
            }
        }
        
        cout<<ans<<ln;
    }
	return 0;
}

#include <iostream>
#include <algorithm>
using namespace std;

inline bool cmp(pair<int, int> x, pair<int, int> y)
{
    int up = x.second - y.second;
    int dw = x.first - y.first;
    if(dw < 0) dw = -dw, up = -up;
    return up <= dw && up >= -dw;
}

const int maxn = 1111;

pair<int, int> arr[maxn];

int main()
{
    int n;
    cin >> n;
    for(int i = 0; i < n; ++i) cin >> arr[i].first >> arr[i].second;
    int ans = 0;
    for(int i = 0; i < n; ++i) {
        for(int j = i + 1; j < n; ++j) {
            if(cmp(arr[i], arr[j])) ans++;
        }
    }
    cout << ans << endl;
    return 0;
}