#include #define rep(i, n) for (int i = 0; i < n; ++i) typedef long long ll; using namespace std; int main() { int N, A, sum = 0, ans = 0; cin >> N; rep(i, N - 1){ cin >> A; sum += A; } rep(i, 101){ if((sum + i) % N == 0){ ans ++; } } cout << ans << endl; return 0; }