/** * author: shu8Cream * created: 26.02.2021 21:24:35 **/ #include using namespace std; #define rep(i,n) for (int i=0; i<(n); i++) #define all(x) (x).begin(), (x).end() using ll = long long; using P = pair; using vi = vector; using vvi = vector; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vi a(n-1); rep(i,n-1) cin >> a[i]; int sum = 0; rep(i,n-1) sum+=a[i]; int ans = 0; rep(i,101){ if((sum+i)%n==0) ans++; } cout << ans << endl; }