import sys n = int(input()) if n == 1: print(101) sys.exit() 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)