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