#include <bits/stdc++.h>
using namespace std;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
int dx2[] = {1, -1, -1, 1, 0, 0, -1, 1};
int dy2[] = {1, -1, 1, -1, 1, -1, 0, 0};
int kmx[] = {-1, -1, 1, 1, 2, -2, 2, -2};
int kmy[] = {2, -2, 2, -2, -1, -1, 1, 1};
class Timer {
 public:
  clock_t T;
  Timer() { T = clock(); }
  ~Timer() {
    fprintf(stderr, "\n%.3f\n", double(clock() - T) / CLOCKS_PER_SEC);
  }
};
int read() {
  int x;
  scanf("%d", &x);
  return x;
}
long long readL() {
  long long x;
  scanf("%lld", &x);
  return x;
}
const int N = 1e5 + 5;
int n, k;
int a[N], b[N], mark[N];
int main() {
  n = read();
  k = read();
  unsigned long long allSum = 0;
  unsigned long long sum = 0;
  unsigned long long ksum = 0;
  unsigned long long anotherSum = 0;
  for (int i = 0; i < n; i++) a[i] = read(), sum += a[i];
  for (int i = 0; i < k; i++)
    b[i] = read() - 1, ksum += a[b[i]], mark[b[i]] = 1;
  for (int i = 0; i < n - 1; i++) {
    allSum += a[i] * a[i + 1];
  }
  allSum += a[0] * a[n - 1];
  int pr, nx;
  for (int i = 0; i < n; i++) {
    pr = i - 1;
    nx = i + 1;
    if (pr == -1) pr = n - 1;
    if (nx == n) nx = 0;
    anotherSum += a[i] * (sum - (a[i] + a[nx] + a[pr]));
  }
  allSum += anotherSum / 2;
  anotherSum = 0;
  for (int i = 0; i < n; i++) {
    pr = i - 1;
    nx = i + 1;
    if (mark[i]) continue;
    if (pr == -1) pr = n - 1;
    if (nx == n) nx = 0;
    if (mark[pr]) pr = n;
    if (mark[nx]) nx = n;
    anotherSum += a[i] * (sum - (a[i] + a[nx] + a[pr]) - ksum);
  }
  allSum -= anotherSum / 2;
  cout << allSum << endl;
  return 0;
}
