#include <bits/stdc++.h>
using namespace std;
const long long inf64 = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<pair<long long, long long> > vec;
  int arr[n + 1][n + 1];
  for (int i = 0; i < n; i++) {
    int f, s;
    cin >> f >> s;
    vec.push_back(make_pair(f, s));
  }
  int ans = n;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int check =
          (vec[i].first * vec[j].first) + (vec[i].second * vec[j].second);
      if (check != 0) ans++;
    }
  }
  cout << ans;
  return 0;
}
