#include<stdio.h>
int main()
{
int num[1000],num1[1000];
int n, i, j, k, number, add, t = 0,i1,j1,k1;
scanf("%d", &n);
for (i = 0; i < n; i++)
{
scanf("%d", &num[i]);
}
for (j = 0; j < i; j++)
{
for (k = j + 1; k < i; k++)
{
add = num[j] + num[k];
for (number = 0; number < i; number++)
{
if (num[number] == add)
{
num1[t] = add;
t++; break;
}
}
}
}
for (i1 = 1; i1 <= 10000; i1++)
{
int x1 = 0;
for (j1 = 0; j1 < t; j1++)
{
if (num1[j1] == i1)
{
x1++;
}
}
if(x1!=0)
t =t - x1 + 1;
}
printf("%d", t);
return 0;
}