|
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int n;
freopen("p1030.in","r",stdin);
freopen("p1030.out","w",stdout);
while (scanf("%d", &n) != EOF)
{
int m, sum = 0;
vector<int> vi;
vector<int> num;
for (int i = 0; i < n; i++)
{
scanf("%d", &m);
vi.push_back(m);
}
sort(vi.begin(), vi.end());
int length = vi.size();
num.push_back(*(vi.begin()));
for (int i = 1; i < length; i++)
{
int len = num.size();
num.push_back(vi[i]);
for (int j = 0; j < len; j++)
{
num.push_back(num[j] + vi[i]);
}
}
int count = 0;
for (vector<int>::iterator it = num.begin(); it != num.end(); it++)
{
if (*it % 11 == 0)
{
count++;
}
}
printf("%d\n", count);
}
fclose(stdin);
fclose(stdout);
return 0;
}