#include <bits/stdc++.h>
using namespace std;
long long sum = 0, n, k, a[100001], c[100001], vis[100001] = {0}, sum1 = 0,
          sum2[100001] = {0};
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (int i = 1; i <= k; i++) {
    scanf("%lld", &c[i]);
    vis[c[i]] = 1;
  }
  sort(c + 1, c + k + 1);
  for (int i = 1; i <= k; i++) {
    sum2[i] = sum2[i - 1] + a[c[i]];
  }
  sum = a[1] * a[n];
  for (int i = 2; i <= n; i++) {
    sum += a[i] * a[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i] == 0) sum1 += a[i];
  }
  for (int i = 1; i <= k; i++) {
    if (c[i] == 1) {
      long long l = sum1;
      if (vis[2] == 0) l -= a[2];
      if (vis[n] == 0) l -= a[n];
      sum += a[1] * l;
    } else if (c[i] == n) {
      long long l = sum1;
      if (vis[1] == 0) l -= a[1];
      if (vis[n - 1] == 0) l -= a[n - 1];
      sum += a[n] * l;
    } else {
      long long l = sum1;
      if (vis[c[i] - 1] == 0) l -= a[c[i] - 1];
      if (vis[c[i] + 1] == 0) l -= a[c[i] + 1];
      sum += a[c[i]] * l;
    }
  }
  for (int i = k; i >= 1; i--) {
    if (c[i] == n) {
      long long l = sum2[i - 1];
      if (vis[1] == 1) l -= a[1];
      if (vis[n - 1] == 1) l -= a[n - 1];
      sum += l * a[n];
    } else {
      long long l = sum2[i - 1];
      if (vis[c[i] - 1] == 1) l -= a[c[i] - 1];
      sum += l * a[c[i]];
    }
  }
  cout << sum << endl;
  return 0;
}
