#include <bits/stdc++.h>
#include <algorithm>
using namespace std;

int main() {
  int N, C;
  cin >> N;
  vector<double> x(N);
  vector<double> y(N);
  C = 0;
  
  for (int i = 0; i < N; i++) {
    cin >> x.at(i) >> y.at(i);
  }
  
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {  
      double t = (y.at(j) - y.at(i)) / (x.at(j) - x.at(i));
      if (t >= -1 && t <= 1) {
        C = C + 1;
      }
    }
  }
  
  cout << C;
  
}
//pikuskd_32->42
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define ll long long
#define fr(i,s,e) for(ll i=s;i<=e;i++)
#define rfo(i,s,e) for(ll i=s;i>=e;i--)
#define f(x,m) for(auto x : m)
#define ff first
#define ss second
const ll INF = (1LL << 60) - 1;
#define pb push_back
#define pp pop_back
#define pf push_front
#define ppf pop_front
#define m_p make_pair
#define mod 1000000007
#define TIME cerr<<"Time Taken:"<<(float)clock()/CLOCKS_PER_SEC*1000<<"ms"<<endl
// __builtin_popcount(n)
// cout << fixed << setprecision(2) << a << endl; ->'a' is floating point.

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
#ifndef ONLINE_JUDGE
	freopen("input1.txt", "r", stdin);
	freopen("output2.txt", "w", stdout);
#endif

	ll t = 1; //cin>>t;
	while (t--) {
		ll n; cin >> n;
		vector<pair<ll, ll>> v;
		ll x, y;
		fr(i, 0, n - 1) {
			cin >> x >> y; v.pb(m_p(x, y));
		}
		ll c = 0;
		fr(i, 0, n - 1) {
			fr(j, i + 1, n - 1) {
				if (abs(v[j].ss - v[i].ss) <= abs(v[j].ff - v[i].ff)) c++;
			}
		}
		cout << c << endl;
	}
	TIME;
	return 0;
}