#include <bits/stdc++.h>
/* #include <atcoder/all> */

#define rng(i, a, b) for (int i = int(a); i < int(b); i++)
#define rep(i, b) rng(i, 0, b)
#define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--)
#define per(i, b) gnr(i, 0, b)

using namespace std;
/* using namespace atcoder; */

using ll = long long;
using P = pair<int, int>;

int main() {
  int n;
  cin >> n;
  vector<int> x(n), y(n);
  rep(i, n) {
    cin >> x.at(i);
    cin >> y.at(i);
  }
  int res = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      double tmp = (double) (y.at(j) - y.at(i)) / (x.at(j) - x.at(i));
      if (tmp >= -1.0 && tmp <= 1.0) {
        res++;
      }
    }
  }
  cout << res << endl;
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define n_l '\n'
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
#define forn(i,n) for(int i=0;i<n;i++)
#define for1(i,n) for(int i=1;i<=n;i++)
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef double db;
typedef vector<vi> vvi;
const ll mod=1000000007;
const ll N=200005; //check this
int dx[] = {-1, 0, 1, 0, 1, 1, -1, -1};
int dy[] = {0, -1, 0, 1, 1, -1, 1, -1};

ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll powb(ll a,ll b) {ll res=1;a ; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a;a=a*a;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}

bool cmp(pair<ll,ll> a, pair<ll,ll> b){
	return (a.fi)*2 + a.se > (b.fi)*2 + b.se;

}

int main(){
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

    int t=1;
    // cin>>t;
    while(t--){
    	int n;cin >> n;
    	vector<pii> a(n);
    	int ans = 0;
    	for(int i = 0;i < n; i++){
    		cin >> a[i].fi >> a[i].se;
    		for(int j = 0;j < i; j++){
    			if(abs(a[i].fi-a[j].fi) >= abs(a[i].se - a[j].se) )
    				ans++;
    		}
    	}
    	cout << ans;
    }
}