# import sys # input = sys.stdin.readline def mp():return map(int,input().split()) def lmp():return list(map(int,input().split())) import math import bisect from copy import deepcopy as dc from itertools import accumulate from collections import Counter, defaultdict, deque def ceil(U,V):return (U+V-1)//V def modf1(N,MOD):return (N-1)%MOD+1 n = int(input()) a = lmp() if n == 1: print(101) exit() aa = sum(a) ans = 0 for i in range(101): if (aa + i) % n == 0: ans += 1 print(ans)