暴力
#include <iostream>
using namespace std;
const int N = 550;
int n;
int a[N];
int main(){
cin>>n;
for (int i = 0;i<n;i++) cin>>a[i];
int cnt = 0;
for (int i = 0;i<n;i++){
for (int j = i;j <n;j++){
int tmp = -a[i];
if (tmp == a[j]) cnt++;
}
}
cout<<cnt<<endl;
return 0;
}