#include using namespace std; #pragma GCC optimize("O0") typedef long long int ll; typedef long double ld; const ll mod = 1e9+7; const ll INF = 1e18; #define rep(i,n) for (ll i = 0; i < (n); ++i) #define Rep(i,a,n) for (ll i = (a); i < (n); ++i) #define All(a) (a).begin(),(a).end() #define Pi acos(-1) using Graph = vector>; using V = vector; using P = pair; int main() { cin.tie(0); ios_base::sync_with_stdio(false); cout << setprecision(15) << fixed; ll n; cin >> n; V a(n-1); ll t = 0; rep(i,n) { cin >> a[i]; t += a[i]; } ll ans = 0; rep(i,101) { ll s = t + i; if (s % n == 0) { ++ans; } } cout << ans << '\n'; }