#include <bits/stdc++.h>
using namespace std;
long long a[100010];
long long vis[100010];
long long sum[100010];
int main() {
  long long x, sum1, ans, n, k;
  while (scanf("%lld%lld", &n, &k) != EOF) {
    ans = 0;
    sum1 = 0;
    vector<long long> V;
    for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
    V.push_back(0);
    for (int i = 0; i < k; i++) {
      scanf("%lld", &x);
      vis[x] = 1;
      V.push_back(x);
    }
    for (int i = 1; i <= n; i++) {
      if (!vis[i]) sum1 += a[i];
    }
    for (int i = 1; i < n; i++) {
      if (!vis[i] && !vis[i + 1]) ans += a[i] * a[i + 1];
    }
    if (!vis[1] && !vis[n]) ans += a[1] * a[n];
    for (int i = 1; i < V.size(); i++) ans += a[V[i]] * sum1;
    for (int i = 1; i < V.size(); i++) {
      sum[i] = sum[i - 1] + a[V[i]];
    }
    for (int i = 2; i < V.size(); i++) ans += a[V[i]] * sum[i - 1];
    printf("%lld\n", ans);
  }
  return 0;
}
