#include <bits/stdc++.h>
using namespace std;
bool cap[100005];
int n, k, s[100005];
long long c[100005];
long long ans = 0, sum = 0;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  c[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> c[i];
    ans += c[i] * c[i - 1];
    sum += c[i];
  }
  ans += c[1] * c[n];
  c[0] = c[n];
  c[n + 1] = c[1];
  for (int i = 1; i <= k; i++) {
    cin >> s[i];
    cap[s[i]] = 1;
    ans += c[s[i]] * (sum - c[s[i]] - c[s[i] - 1] - c[s[i] + 1]);
  }
  sum = 0;
  for (int i = 1; i <= k; i++) {
    ans -= sum * c[s[i]];
    sum += c[s[i]];
  }
  if (cap[n]) cap[0] = 1;
  for (int i = 1; i <= n; i++) {
    if (cap[i] && cap[i - 1]) ans += c[i] * c[i - 1];
  }
  cout << ans << endl;
  return 0;
}
