#include #define FastIO (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false)) #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; void solve() { int n; cin >> n; vector An(n - 1); for (auto &A : An) cin >> A; int sum = 0; for (const auto &a : An) sum += a; int count = 0; for (int i = 0; i <= 100; i++) { if ((sum + i) % n == 0) { count++; } } cout << count << '\n'; } int main() { FastIO; solve(); return 0; }