#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;

int gc = 0;
void br() {
  cout << "(" << gc++ << ") "
       << "======" << endl;
}

template <typename T>
void print(vector<T> &a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i];
    if (i + 1 < a.size()) {
      cout << " ";
    }
  }
  cout << endl;
}
void print(int n) { cout << n << endl; }
void print(ll n) { cout << n << endl; }
void print(ull n) { cout << n << endl; }
void print(double n) { cout << n << endl; }
void print(long double n) { cout << n << endl; }
void print(char n) { cout << n << endl; }
void print(string n) { cout << n << endl; }
void Yes() { cout << "Yes" << endl; }
void No() { cout << "No" << endl; }
double toRadian(double deg) { return deg * M_PI / 180; }

ll gcd(ll a, ll b) {
  if (a < b) {
    a ^= b;
    b ^= a;
    a ^= b;
  }
  return b ? gcd(b, a % b) : a;
}

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

int main() {
  ll n;
  cin >> n;
  vector<P> v(n);

  for (int i = 0; i < n; i++) {
    ll a, b;
    cin >> a >> b;

    v[i].first = a;
    v[i].second = b;
  }

  ll ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      double dx = v[j].first - v[i].first;
      double dy = v[j].second - v[i].second;
      if (dx != 0) {
        double k = dy / dx;

        if (-1 <= k && k <= 1) {
          ans++;
        }
      }
    }
  }

  print(ans);

  return 0;
}

#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <climits>
#include <string>
#include <cmath>
#include <bitset>
#include <complex>
#include <functional>
#include <ctime>
#include <cassert>
#include <fstream>
#include <stack>
#include <random>
#include <iomanip>

#include <fstream>


using namespace std;
typedef long long ll;
typedef long double dd;
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
typedef pair<ll,ll> l_l;
ll inf=(ll)1E18;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
dd EPS=1E-9;
#define endl "\n"
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);



int main(){fastio
    ll n;cin>>n;
    if(n==1){
        cout<<0<<endl;
        return 0;
    }
    ll x[n],y[n];
    rep(i,0,n-1){
        cin>>x[i]>>y[i];
    }
    ll ans=0;
    rep(i,0,n-2){
        rep(j,i+1,n-1){
            //abs(y[j]-y[i])/abs(x[j]-x[i])が1以下
            if(abs(y[j]-y[i])<=abs(x[j]-x[i])){
                ans++;
            }
        }
    }
    cout<<ans<<endl;
    
    return 0;
    
}

