def main(): n = int(input()) tot = sum(list(map(int, input().split()))) ans = 0 for i in range(101): if (tot + i) % n == 0: ans += 1 print(ans) if __name__ == "__main__": main()