/** * @FileName a.cpp * @Author kanpurin * @Created 2021.02.26 21:23:13 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int n;cin >> n; int sum = 0; for (int i = 0; i < n-1; i++) { int a;cin >> a; sum += a; } int ans = 0; for (int p = 0; p <= 100; p++) { if ((sum+p) % n == 0) { ans++; } } cout << ans << endl; return 0; }