#include <bits/stdc++.h>

using namespace std;

const int MAX = 1500;
const int COORDINATE_MAX = 100000000;

class Tacka
{

  private:
  int x, y;

  // Getters
  public:
  int getX() { return x; }
  int getY() { return y; }

  // Setters
  public:
  void setX (int New) {x = New; }
  void setY (int New) {y = New; }

};

bool isIt(Tacka a, Tacka b, Tacka c, Tacka d) {

  int f = abs(a.getY() - b.getY());
  int s = abs(a.getX() - b.getX());
  int t = abs(c.getY() - d.getY());
  int e = abs(c.getX() - d.getX());

  if(s == 0 && e == 0) {
    double c1 = sqrt(s*s + (double)f*f);
    double c2 = sqrt(e*e + (double)t*t);
    double r = c1/c2;
    if(r <= 0.5 || r >= 2) return true;
    return false;
  }

  double tg1 = f / (double)s;
  double tg2 = t / (double)e;
  if(tg1 == tg2) {
    double c1 = sqrt(s*s + (double)f*f);
    double c2 = sqrt(e*e + (double)t*t);
    double r = c1/c2;
    if(r <= 0.5 || r >= 2) return true;
    return false;
  }
  return false;
}

int main() {

  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);

  int n;
  cin>>n;
  Tacka a[MAX];
  int x, y;
  for(int i = 0 ; i < n ; i++) {
    cin>>x>>y;
    a[i].setX(x);
    a[i].setY(y);
  }

  if(n < 4) {
    cout<<"0";
    return 0;
  }

  int Counter = 0;
  bool Out = false;
  for(int i = 0 ; i < n ; i++) {
    if(Out) break;
    for(int j = i+1 ; j < n ; j++) {
      for(int u = j+1 ; u < n ; u++) {
        for(int s = u+1 ; s < n ; s++) {
          if(j + 1 == n) {
            Out = true;
            break;
          }
          if (isIt(a[i], a[j], a[u], a[s])) Counter++;
          if (isIt(a[i], a[u], a[j], a[s])) Counter++;
          if (isIt(a[i], a[s], a[j], a[u])) Counter++;
        }
      }
    }
  }
  cout<<Counter;

  return 0;
}