#include <bits/stdc++.h>
using namespace std;
long long n, i, j, m, t1, t2, t3, a[200001], b[200001];
int main() {
  long long sum = 0, ans = 0;
  scanf("%I64d%I64d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%I64d", &a[i]);
    sum += a[i];
  }
  a[n + 1] = a[1];
  for (i = 1; i <= n; i++) ans += a[i] * a[i + 1];
  for (i = 1; i <= m; i++) scanf("%d", &b[i]);
  sort(b + 1, b + m + 1);
  for (i = 1; i <= m; i++) {
    t1 = b[i];
    if (t1 == 1)
      t2 = a[n];
    else
      t2 = a[t1 - 1];
    if (t1 == n)
      t3 = a[1];
    else
      t3 = a[t1 + 1];
    if (b[i - 1] + 1 == b[i] && i > 1) t2 = 0;
    if (b[i] == n && b[1] == 1) t3 = 0;
    if (sum - t2 - t3 - a[t1] >= 0) ans += (sum - t2 - t3 - a[t1]) * a[t1];
    sum -= a[t1];
  }
  printf("%I64d", ans);
}
