#include <bits/stdc++.h>
using namespace std;
int n, k;
long long num[100010], cap[100010], vis[100010];
long long tot = 0, ans = 0, cnt = 1, ano = 0;
int main() {
  scanf("%d %d", &n, &k);
  if (k == n) {
    for (int i = 1; i <= n; i++) {
      scanf("%I64d", &num[i]);
      tot += num[i];
    }
    for (int i = 1; i <= k; i++) {
      scanf("%I64d", &cap[i]);
      vis[cap[i]] = 1;
    }
    for (int i = 1; i <= n; i++) ans += num[i] * (tot - num[i]);
    ans /= 2;
    printf("%I64d", ans);
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &num[i]);
    ans += num[i] * num[i - 1];
    tot += num[i];
  }
  ans += num[n] * num[1];
  for (int i = 1; i <= k; i++) {
    scanf("%I64d", &cap[i]);
    vis[cap[i]] = 1;
    if (cap[i] == 1)
      ans += num[1] * (tot - num[1] - num[n] - num[2]);
    else if (cap[i] == n)
      ans += num[n] * (tot - num[1] - num[n] - num[n - 1]);
    else
      ans +=
          num[cap[i]] * (tot - num[cap[i]] - num[cap[i] + 1] - num[cap[i] - 1]);
    ano += num[cap[i]];
  }
  long long jian = 0;
  for (int i = 1; i <= k; i++) jian += num[cap[i]] * (ano - num[cap[i]]);
  ans -= jian / 2;
  for (int i = 1; i < n; i++)
    if (vis[i] && vis[i + 1]) ans += num[i] * num[i + 1];
  if (vis[n] && vis[1]) ans += num[1] * num[n];
  printf("%I64d", ans);
  return 0;
}
