#include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
 
using namespace std;
using namespace __gnu_pbds;
 
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
*this << "[";
for (auto it = d.b; it != d.e; ++it)
*this << ", " + 2 * (it == d.b) << *it;
ris << "]";
}

#define trace(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define cool ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define int  long long int
#define pb push_back
#define fe first
#define lb lower_bound 
#define ub upper_bound
#define pii pair<pair<int,int>,pair<int,int> >
#define se second
#define endl "\n"
#define pi pair<int, int>
#define mi          map<int,int>
#define mii         map<pi,int>
#define vi vector<int> 
#define vvi vector<vi>
#define bs   binary_search
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rep1(i,a,b) for(int i=a;i<=b;i++)	
#define all(c) (c).begin(),(c).end()
#define sz(x)       (int)x.size() 
#define PI 3.14159265358979323846
 
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> o_set;
 
 
 const int N=1e5+10;
 
 const int INF=1e18;
 
 int mod= 998244353;
 int dx[4]={0,0,+1,-1};
 int dy[4]={+1,-1,0,0};  
 
 
int po(int a, int b) {
	int res = 1;
	while (b > 0) {
		if (b & 1)
			res = (res%mod * a%mod) % mod;
		a =(a%mod*a%mod) % mod;
		b >>= 1;
	}
	 return res;
}


int n;

void solve() {		
  cin>>n;
  vector<pi> vp;
  
  rep(i,0,n) {
			  int x,y;
			  cin>>x>>y;
			  vp.pb({x,y});
			}
		
		int ct=0;	
		sort(all(vp));
		
		
		rep(i,0,n) {
			  rep(j,i+1,n) {
						  int x1=vp[i].fe,y1=vp[i].se;
						  int x2=vp[j].fe,y2=vp[j].se;
						   int dx=x2-x1,dy=y2-y1;
						   if(dx!=0) {
										   double ans=(double)dy/dx;
										   if(ans>=-1 && ans<=1) ct++;
										}					  
						}
			}
			
			cout<<ct<<endl;
			   
}	
 
 
    
int32_t main() {
	cool;
	int t=1;
	//~ freopen("input.txt","r",stdin);	
 //~ freopen("output.txt","w",stdout);	
    
 //cin>>t;
	while(t--)
	  solve();
 
  return 0;	   
}




























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

int main() {
    int n;
    cin>>n;
    int count=0;
    vector<pair<int, int>> points;
    for (int i=0; i<n; i++){
        int a, b;
        cin>>a>>b;
        points.push_back({a, b});
    }
    bool used[1005][1005];
    for (int i=0; i<1005; i++) for (int j=0; j<1005; j++) used[i][j]=false;
    for (int i=0; i<n; i++){
        for (int j=0; j<n; j++){
            if (j!=i){
                double slope = ((double)(points[j].second-points[i].second)/(double)(points[j].first-points[i].first));
                if (slope>=-1 && slope<=1 && used[i][j]==false && used[j][i]==false){
                    count++;
                    used[i][j]=true;
                    used[j][i]=true;
                }
            }
        }
    }
    cout<<count<<endl;
	return 0;
}
