#include <bits/stdc++.h>
using namespace std;
void print_vector(const vector<int>& vi) {
  return;
  for (const auto& it : vi) {
    cout << it << " ";
  }
  cout << endl;
}
int main() {
  int nchoices;
  vector<int> choices;
  cin >> nchoices;
  for (int i = 0; i < nchoices; i++) {
    int x;
    cin >> x;
    choices.push_back(abs(x));
  }
  print_vector(choices);
  sort(begin(choices), end(choices));
  print_vector(choices);
  auto itc = begin(choices);
  auto next_itc = next(itc);
  uint64_t npairs = 0;
  while (next_itc != end(choices)) {
    if (*itc == 0) {
      itc = next(itc);
      next_itc = next(itc);
      continue;
    }
    if (*itc == *next_itc) {
      npairs++;
      next_itc = next(next_itc);
    }
    auto low = upper_bound(next_itc, end(choices), *itc);
    if (low == end(choices)) {
      itc = next(itc);
      next_itc = next(itc);
      continue;
    }
    if (*low > *itc * 2) {
      itc = next(itc);
      next_itc = next(itc);
      continue;
    }
    auto up = lower_bound(next(low), end(choices), *itc * 2 + 1);
    npairs += up - low;
    itc = next(itc);
    next_itc = next(itc);
  }
  cout << npairs << endl;
  return 0;
}
