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