N=int(input()) A=list(map(int,input().split())) mod=10**9+7 ANS=1 S=sum(A) for a in A: ANS+=(S-a)*pow(S,mod-2,mod)*a ANS%=mod print(ANS)