#include <bits/stdc++.h>
using namespace std;
int main () {
  int n;
  cin >> n;
  vector<int> x(n),y(n);
  for(int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  int ans = 0;
  for(int i = 0; i < n; i++) {
    for(int j = i+1; j < n; j++) {
    double k = (double)(y[j]-y[i])/(x[j]-x[i]);
    if(k>=-1&&k<=1) ans++;
    }
  }
  cout << ans << endl;
}
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n - 1; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i <= n; i++)
#define FORR(i, m, n) for(int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define VSORTR(v) sort(v.rbegin(), v.rend());
#define ALL(v) (v).begin(),(v).end()
 
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<ll, ll>;

template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

const ll MOD = 1e9 + 7;
const ll INF = 1e18;

int main(){
	cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    ll n;
    cin >> n;
    
    vll x(n), y(n);
    REP(i, n) cin >> x[i] >> y[i];

    ll res = 0;
    REP(i, n) {
        REP(j, n) {
            if (j <= i) continue;
            if (abs(x[j] - x[i]) >= abs(y[j] - y[i])) res++;
        }
    }
    cout << res << endl;
    return 0;
}