#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k, sum = 0, ans = 0, a[100005], b[100005], vis[100005] = {0};
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    vis[i] = 0;
    cin >> a[i];
    sum += a[i];
  }
  for (int i = 0; i < k; i++) {
    cin >> b[i];
    vis[b[i] - 1] = 1;
  }
  int count = 0;
  for (int i = 0; i < n - 1; i++) {
    if (vis[i] == 1) {
      ans += (sum - a[i]) * a[i];
      sum -= a[i];
    } else {
      if (vis[i + 1] == 0) {
        ans += a[i] * a[i + 1];
      }
    }
  }
  if (vis[n - 1] == 1) {
    ans += (sum - a[n - 1]) * a[n - 1];
    sum -= a[n - 1];
  } else if (vis[0] == 0 && vis[n - 1] == 0)
    ans += a[0] * a[n - 1];
  cout << ans << endl;
  return 0;
}
