def main(): N = int(input()) if N == 1: print(101) return A = map(int, input().split(" ")) z = 0 for x in range(0, 101): s = sum([*A, x]) if s // N == s / N: z += 1 print(z) if __name__ == '__main__': main()