#include <bits/stdc++.h>
using namespace std;
const int M = 2 * 100000 + 5;
unsigned long long a[M], b[M], n, i, j, ans;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i] >> b[i];
  for (i = 1; i <= n - 1; i++)
    for (j = i + 1; j <= n; j++)
      if (a[i] * a[j] + b[i] * b[j] != 0) ans++;
  cout << ans + n;
  return 0;
}
