/****************************************************************************************************************************/
/*************************************                 My Template Start                *************************************/
/****************************************************************************************************************************/
#ifndef LOCAL
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#endif

#include<bits/stdc++.h>

#define all(x)          (x).begin(),(x).end()
#define sortall(x)      sort(all(x))
#define reverseall(x)   reverse(all(x))
#define siz(x)          (int)(x).size()
#define rep(i, n)       for(int i=0;i<(n);i++)
#define repi(i, l, r)   for(int i=l;i<=(r);i++)
#define V1(t)           vector<t>
#define V2(t)           vector<vector<t>>>
#define V3(t)           vector<vector<vector<t>>>
#define VV1(t, a)       vector<t>(a)
#define VV2(t, a, b)    vector<vector<t>>(a, VV1(t, b))
#define VV3(t, a, b, c) vector<vector<vector<t>>>(a, VV2(t, b, c))

#define pb push_back
#define eb emplace_back

#define fi first
#define se second

using namespace std;
using ull = unsigned long long;
using ll  = long long;
using ld  = long double;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
using pil = pair<int, long long>;
using pli = pair<long long, int>;
using vi  = vector<int>;
using vd  = vector<double>;
using vl  = vector<ll>;
using vii = vector<pii>;
using vll = vector<pll>;

#ifdef LOCAL
template<typename Type> void _DEBUG(Type arg) { cerr << arg; }
template<typename Type, typename... Types> void _DEBUG(Type arg, Types ...args) { cerr << arg << ", "; _DEBUG(args...); }
#define debug(...) cerr << "[ " << #__VA_ARGS__ << " ] : ", _DEBUG(__VA_ARGS__)
void _DEBUG_START() { cerr << "\n<===== DEBUG START ======>\n"; }
void _DEBUG_END()   { cerr << "\n<====== DEBUG END =======>\n"; }

#define debug2(...) _DEBUG_START(), debug(__VA_ARGS__), _DEBUG_END()
#else
#define debug(...)
#define debug2(...)
#endif

constexpr char ln  = '\n';
constexpr char sp  = ' ';
constexpr int dy[] = {-1,1,0,0,-1,-1,1,1};
constexpr int dx[] = {0,0,-1,1,-1,1,-1,1};
const ld PI        = acos((ld)-1);

template<int fp> struct fastio { fastio() { ios::sync_with_stdio(false); cin.tie(0); if(fp)cout<<fixed<<setprecision(fp); } };
template<typename Type> void input(Type &arg){cin >> arg;}
template<typename Type, typename... Types> void input(Type &arg, Types &...args){cin>>arg;input(args...);}
template<typename Type> void output(Type arg){cout<<arg;}
template<typename Type, typename... Types> void output(Type arg, Types ...args){cout<<arg;output(args...);}
template<typename Type> inline ostream& operator<<(ostream &out, const vector<Type> &v) { for(auto &i: v) out<<i<<' '; return out; }
template<typename Type> inline istream& operator>>(istream &in, vector<Type> &v)       { for(auto &i: v) in>>i; return in; }

template<typename T>
T power(T a, T b, T mod=numeric_limits<T>::max()){
    if(b == 0)return 1;
    if(b % 2)return a * power(a, b-1, mod) % mod;
    return power(a * a % mod, b >> 1, mod);
}

/****************************************************************************************************************************/
/*************************************                   My Template End                *************************************/
/****************************************************************************************************************************/

bool slope(pii a, pii b){
    int x = abs(a.fi - b.fi);
    int y = abs(a.se - b.se);
    // -1 ≤ y / x ≤ 1
    return -x <= y && y <= x;
}

int main(){
    fastio<0>();
    
    int n; cin >> n;
    vii v(n);
    rep(i, n){
        int x, y; cin >> x >> y;
        v[i] = pii(x, y);
    }

    int cnt = 0;
    rep(i, n){
        repi(j, i + 1, n - 1){
            cnt += slope(v[i], v[j]); 
        }
    }
    
    cout << cnt << ln;
    return 0;
}

#include<bits/stdc++.h>
//Everything is theoretically impossible untill it is done
#define ll long long 
#define vecto vector<int>
#define set set<int>
#define stack stack<int>
#define io ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define pp pair<int,int>
#define mk make_pair
#define mod 10000007
#define MAX INT_MAX
#define MIN INT_MIN
#define w(x) int x; cin>>x; while(x--)
#define set_built(x) __builtin_popcountll(x)
#define zero_built(x) __bultin_ctzll(x)
using namespace std;
int sum(int n){
    int p=0;
    while(n!=0){
        int k;
        k=n%10;
        p=p+k;
        n=n/10;
    }
    return p;
}

// Asli function
void solve(){
    vector<pair<double,double>>v;
   int t;
   cin>>t;
   while(t--){
       double x,y;
       cin>>x>>y;
       v.push_back(mk(x,y));
   }
   int count=0;
   for(int i=0; i<v.size()-1; i++){
       for(int j=i+1; j<v.size(); j++){
           double t;
           t=(v[j].second-v[i].second)/(v[j].first-v[i].first);
           if(t>=-1&&t<=1)
           count++;
       }
   }
   cout<<count<<endl;
   
}

//naam ka function
int main(){
        solve();
    return 0;
}