#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int flag[N];
unsigned long long sum, ans, ret;
unsigned long long c[N];
inline unsigned long long read() {
  unsigned long long x = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x;
}
int main() {
  int i, j, n, k;
  unsigned long long a, x;
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n; i++) {
    c[i] = read();
    sum += c[i];
  }
  for (i = 1; i <= k; i++) {
    a = read();
    flag[a] = 1;
  }
  for (i = 1; i <= n; i++) {
    if (flag[i]) ret += c[i];
  }
  for (i = 1; i <= n; i++) {
    if (i == 1)
      a = (c[2] + c[n]);
    else if (i == n)
      a = (c[n - 1] + c[1]);
    else
      a = (c[i + 1] + c[i - 1]);
    if (flag[i]) {
      x = (sum - c[i]) * 2;
      x -= a;
      x -= ret - c[i];
      if (i == 1) {
        if (flag[2]) x += c[2];
        if (flag[n]) x += c[n];
      } else if (i == n) {
        if (flag[1]) x += c[1];
        if (flag[n - 1]) x += c[n - 1];
      } else {
        if (flag[i + 1]) x += c[i + 1];
        if (flag[i - 1]) x += c[i - 1];
      }
      ans += c[i] * x;
    } else {
      ans += c[i] * a;
    }
  }
  ans /= 2;
  cout << ans;
}
