#include <bits/stdc++.h>
using namespace std;
const int N = 1E5 + 2;
int arr[N];
map<long long, long long> mp;
set<long long> st;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    mp[arr[i]]++;
    st.insert(arr[i]);
  }
  long long int counter = 0;
  sort(arr, arr + n);
  for (auto it = st.begin(); it != st.end(); it++) {
    if (st.find(-*it) != st.end() && *it != 0) {
      counter += mp[*it] * mp[-*it];
      mp[*it] = 0;
      mp[-*it] = 0;
    } else if (*it == 0)
      counter += (mp[0] * (mp[0] - 1)) / 2;
  }
  cout << counter;
}
