def main(): N = int(input()) A = list(map(int,input().split())) total = sum(A) count = 0 if N == 1: print(0) exit() else: for i in range (0, 101): if (total + i ) % N == 0: count += 1 print(count) main()