# URL : https://yukicoder.me/problems/no/1413 n = int(input()) a = list(map(int, input().split())) sm = sum(a) res = 0 for i in range(101): if (sm + i) % n == 0: res += 1 print(res)