#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n, k;
long long c[maxn];
int vis[maxn];
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) scanf("%I64d", &c[i]);
  for (int i = 0; i < k; ++i) {
    int x;
    scanf("%d", &x);
    vis[x] = 1;
  }
  long long sum1 = 0, sum2 = 0;
  for (int i = 1; i <= n; ++i) {
    if (vis[i]) {
      sum1 += c[i];
    }
    sum2 += c[i];
  }
  long long ans = 0;
  for (int i = 1; i <= n; ++i) {
    if (vis[i]) {
      ans += (sum2 - c[i]) * c[i];
    } else {
      int x = i - 1;
      int x1 = (x - 1 + n) % n + 1, x2 = (x + 1) % n + 1;
      long long tmp = c[x1] + c[x2];
      if (vis[x1]) tmp -= c[x1];
      if (vis[x2]) tmp -= c[x2];
      tmp += sum1;
      ans += c[i] * tmp;
    }
  }
  printf("%I64d\n", ans / 2);
}
