def main(): N = int(input()) if N == 1: print(101) return A = list(map(int, input().split())) A_sum = sum(A) patterns = 0 for score in range(101): if (A_sum + score) % N == 0: patterns += 1 print(patterns) if __name__ == "__main__": main()