#include #include #include #include #include using namespace std; int main() { int n; int cnt=0; int sum = 0; cin >> n; vector a(n-1); for (int i = 0; i < n-1; i++) { cin >> a[i]; sum += a[i]; } for (int i = 0; i <= 100; i++) { if ((sum + i) % n == 0) cnt += 1; } if (n == 1) cout << 0 << endl; else cout << cnt << endl; return 0; }