MOD = 998244353 n = int(input()) a = list(map(int, input().split())) p = sum(a) % MOD print((p * pow(n, -1, MOD)) % MOD)