#include <bits/stdc++.h>
using namespace std;
long long d[300005], t[200005], p[200005];
int main() {
  long long n, k, sum = 0, ans = 0;
  scanf("%lld%lld", &n, &k);
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &d[i]);
    sum += d[i];
  }
  for (long long i = 1; i <= k; i++) {
    scanf("%lld", &t[i]);
    p[t[i]] = 1;
  }
  for (long long i = 1; i <= n; i++) {
    if (p[i]) {
      if (p[(i + n - 2) % n + 1])
        ans += d[i] * (sum - d[i]);
      else
        ans += d[i] * (sum - d[i] - d[(i + n - 2) % n + 1]);
      sum -= d[i];
    } else
      ans += d[i] * d[i % n + 1];
  }
  printf("%lld", ans);
  return 0;
}
