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

float area(int x1, int y1, int x2, int y2, int x3, int y3)
{
   return abs((x1*(y2-y3) + x2*(y3-y1)+ x3*(y1-y2))/2.0);
}

bool isInside(int x1, int y1, int x2, int y2, int x3, int y3, int x, int y)
{
   float A = area (x1, y1, x2, y2, x3, y3);

   float A1 = area (x, y, x2, y2, x3, y3);

   float A2 = area (x1, y1, x, y, x3, y3);

   float A3 = area (x1, y1, x2, y2, x, y);

   return (A == A1 + A2 + A3);
}


int main ()
{
  long long n;
  cin >> n;
  long long x[n];
  long long y[n];
  for (int i=1; i<=n; i++)
    cin >> x[i] >> y[i];
  long long ispis=0;

  if (n==3)
  {
      int da=0;
      if (isInside(x[1], y[1], x[2], y[2], x[3], y[3], 0, 0))
      {
          ispis++;
          da=1;
      }
      cout << ispis << endl;
      double k12 = (y[1]-y[2])/(x[1]-x[2]);
      double m12 = y[1]-k12*x[1];
      double k13 = (y[1]-y[3])/(x[1]-x[3]);
      double m13 = y[1]-k13*x[1];
      double k23 = (y[2]-y[3])/(x[2]-x[3]);
      double m23 = y[2]-k23*x[2];
      double k10 = (y[1]-0)/(x[1]-0);
      double m10 = y[1]-k10*x[1];
      double k20 = (y[2]-0)/(x[2]-0);
      double m20 = y[2]-k20*x[2];
      if (k12==k10 && m12==m10 && da==1)
        ispis++;
    
      if (k13==k10 && m13==m10 && da==1)
        ispis++;
      
      


  }

  if (n!=3)
  {
      ispis=0;
      long long a, b, nula;
      a=0; b=0; nula=0;

      for (int i=2; i<=n; i++)
      {
          double m, k, nulax;
          k = (y[1]-y[i])/(x[1]-x[i]);
          m = 1-k*x[1];
          nulax=-m/k;
          if (nulax>0)
            a++;
          if (nulax<0)
            b++;
          if (nulax==0)
            nula++;
      }
      ispis=a*b+nula*(n-2+1);
  }
  cout << ispis << endl;
}