n,k=map(int,input().split()) a=sum(map(int,input().split())) print(a*-~k%998244353)