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

#define int long long
#define forn(i,a,n) for (int i=a; i<n; i++)

int n;
int a[1001],b[1001];

signed main(){
	ios::sync_with_stdio(false);
	cin.tie(0);

	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);

	cin>>n;
	forn(i,0,n)
		cin>>a[i]>>b[i];
	int cnt=0;
	forn(i,0,n){
		forn(j,i+1,n){
			long double x=a[i]-a[j];
			long double y=b[i]-b[j];
			if (y/x>=-1 && y/x<=1){
				cnt++;
			}
		}
	}
	cout<<cnt<<endl;
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
template<typename T, typename V> using umap = unordered_map<T, V>;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
using vs = vector<string>;
using mapii = map<int, int>;
using umapii = umap<int, int>;
#define _rep(i, n) _repi(i, 0, n)
#define _repi(i, a, b) for(ll i = (ll) (a); i < (ll) (b); i++)
#define _get_rep(_1, _2, _3, NAME, ...) NAME
#define rep(...) _get_rep(__VA_ARGS__, _repi, _rep) (__VA_ARGS__)
#define all(x) x.begin(), x.end()
#define chmax(x, y) (x) = max((x), (y))
#define chmin(x, y) (x) = min((x), (y))
#define mkpair make_pair
#define print(...) osout(cout, __VA_ARGS__)
#define dbg(...) osout(cerr, __VA_ARGS__)
template<typename T> istream& operator >>(istream& is, vector<T>& v) {
    rep(i, v.size()) { cin >> v[i]; } return is;
}
template<typename T1, typename T2> ostream& operator <<(ostream& os, pair<T1, T2> p) {
    os << p.first << ", " << p.second; return os;
}
template<typename T> ostream& operator <<(ostream& os, vector<T> v) {
    if(v.size()==0){ return os; } rep(i, v.size()-1) { os << (v[i]) << ' '; } os << v[v.size()-1]; return os;
}
void osout(ostream& os) { os << endl; }
template<class S, class... T> void osout(ostream& os, S s, T... t) {
    os << (s); if (sizeof...(t)) os << ' '; osout(os, t...);
}
void solve();

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    // cout << fixed << setprecision(15);
    solve();
    return 0;
}

void solve() {
    ll a,b,c,d; cin>>a>>b>>c>>d;
    print(min({a,b,c,d}));
}
