def main(): N = int(input()) 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()