def main(): N = int(input()) A = sum(map(int, input().split())) ans = 0 for i in range(101): if (A+i) % N == 0: ans += 1 print(ans) if __name__ == '__main__': main()