# URL : https://yukicoder.me/problems/no/1413 n = int(input()) if n == 1: print(101) exit(0) 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)