#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> weight(105);
vector<int> dp(100005);
int main()
{
cin >> N;
int sum = 0;
for (int i = 0; i < N; i++)
{
cin >> weight[i];
sum += weight[i];
}
dp[0] = 1;
for (int i = 0; i < N; i++)
{
for (int j = sum; j >= weight[i]; j--)
{
dp[j] = max(dp[j], dp[j - weight[i]]);
}
}
for (int i = 0; i < N; i++)
{
for (int j = 1; j <= sum; j++)
{
dp[j] = max(dp[j], dp[j + weight[i]]);
}
}
int res = 0;
for (int i = 1; i <= sum; i++)
{
if (dp[i] > 0)
{
res++;
}
}
cout << res;
return 0;
}