#include <bits/stdc++.h>
using namespace std;
const int OO = (int)2e9 + 5;
const int MOD = (int)1e9 + 7;
const long double Pi = 3.141592653589793238;
const int N = (int)1e5 + 5;
long long JcBKeF[N], qhWe[N], eQbAkb[N], n, k;
long long yNSgjL = 0, QkZye = 0, QkZye_qhWe = 0;
bool isqhWe[N];
int main() {
  cin >> n >> k;
  for (int i = (int)(1); i <= (int)(n); i++) cin >> JcBKeF[i];
  memset(isqhWe, false, sizeof(isqhWe));
  for (int i = (int)(1); i <= (int)(k); i++) {
    cin >> qhWe[i];
    isqhWe[qhWe[i]] = true;
  }
  for (int i = (int)(2); i <= (int)(n); i++)
    if (!isqhWe[i - 1] && !isqhWe[i]) yNSgjL += JcBKeF[i - 1] * JcBKeF[i];
  if (!isqhWe[1] && !isqhWe[n]) yNSgjL += JcBKeF[1] * JcBKeF[n];
  for (int i = (int)(1); i <= (int)(n); i++) QkZye += JcBKeF[i];
  for (int i = (int)(1); i <= (int)(k); i++) {
    yNSgjL += JcBKeF[qhWe[i]] * (QkZye - JcBKeF[qhWe[i]] - QkZye_qhWe);
    QkZye_qhWe += JcBKeF[qhWe[i]];
  }
  cout << yNSgjL;
}
