#include using namespace std; #define int long long signed main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); srand((unsigned)time(NULL)); int N; cin>>N; vector A(N); int s = 0, t = 0; for(int i=0;i>A[i]; s += A[i]; t += A[i]*A[i]; } cout<<(s*s-t)/2<