问题 B:两数归零

文件提交:无需freopen 内存限制:128 MB 时间限制:1.000 S
评测方式:普通裁判 命题人:
提交:3 解决:2

题目描述

给定 lns="http://www.w3.org/1998/Math/MathML">� 个整数 lns="http://www.w3.org/1998/Math/MathML">�1,�2,�3,…,��,请统计有多少二元组 lns="http://www.w3.org/1998/Math/MathML">�,� 满足 lns="http://www.w3.org/1998/Math/MathML">�<� 且满足 lns="http://www.w3.org/1998/Math/MathML">��+��=0

输入


  • 第一行:单个整数表示 lns="http://www.w3.org/1998/Math/MathML">�
  • 第二行:lns="http://www.w3.org/1998/Math/MathML">� 个整数表示 lns="http://www.w3.org/1998/Math/MathML">�1,�2,�3,…,��
  •  的数据,lns="http://www.w3.org/1998/Math/MathML">1≤�≤1000
  • lns="http://www.w3.org/1998/Math/MathML">60% 的数据,lns="http://www.w3.org/1998/Math/MathML">1≤�≤20000
  • lns="http://www.w3.org/1998/Math/MathML">100% 的数据,lns="http://www.w3.org/1998/Math/MathML">1≤�≤300000
  • lns="http://www.w3.org/1998/Math/MathML">−1,000,000,000≤��≤1,000,000,000



输出

单个整数:表示有多少二元组的和为零。

样例输入-1 复制

3
1 -1 0

样例输出-1 复制

1