#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<n;i++)

int main(){
  int n,a,b;
  double grad;
  int cnt = 0;
  cin >> n;
  vector<double> x,y;
  rep(i,n){
    scanf("%d", &a);
    scanf("%d", &b);
    x.push_back(double(a));
    y.push_back(double(b));
  }
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      grad = (y[i]-y[j])/(x[i]-x[j]);
      if(-1 <= grad && grad <= 1){\
        cnt++;
    }
    }
  }
  cout << cnt << "\n";
}

// C++ program to count number of ways to express 
// N as sum of consecutive numbers. 
#include <bits/stdc++.h> 
using namespace std; 

long long int countConsecutive(long long int N) 
{ 
  // constraint on values of L gives us the 
  // time Complexity as O(N^0.5) 
  long long int count = 0; 
  for (long long int L = 1; L * (L + 1) < 2 * N; L++) 
  { 
    //long long double a = ; 
    if ((1.0 * N-(L * (L + 1)) / 2) / (L + 1)-(long long int)((1.0 * N-(L * (L + 1)) / 2) / (L + 1)) == 0.0) 
      count++;     
  } 
  return count; 
} 

// Driver Code 
int main() 
{ 
  long long int N;
  cin>>N;
  cout << 2*countConsecutive(N)+2 << endl; 
  
  return 0; 
} 
