#include int ri() { int n; scanf("%d", &n); return n; } int main() { int n = ri(); int sum = 0; for (int i = 1; i < n; i++) sum += ri(); int res = 0; for (int i = 0; i <= 100; i++) if ((sum + i) % n == 0) res++; printf("%d\n", res); return 0; }