n = int(input()) a = list(map(int, input().split())) cnt = 0 ak = sum(a) for x in range(101): if (ak + x) % n == 0: cnt += 1 print(cnt)