n = int(input()) a = list(map(int, input().split())) count = 0 num = sum(a) for i in range(101): if (num +i) % n == 0: count += 1 print(count)