#include <bits/stdc++.h>
int main(int argc, const char *argv[]) {
  long n, k, i;
  scanf("%ld %ld", &n, &k);
  int c[100001];
  int ind_capital[100001];
  for (i = 0; i < n; i++) {
    int cc;
    scanf("%d", &cc);
    c[i] = cc;
    ind_capital[i] = 0;
  }
  for (i = 0; i < k; i++) {
    long capital;
    scanf("%ld", &capital);
    ind_capital[capital - 1] = 1;
  }
  long long sum_capital_c, sum_capital_square, sum_cities;
  sum_capital_c = sum_capital_square = sum_cities = 0;
  for (i = 0; i < n; i++) {
    if (ind_capital[i]) {
      sum_capital_c += c[i];
      sum_capital_square += c[i] * c[i];
    }
    sum_cities += c[i];
  }
  long long res;
  res = sum_capital_c * sum_cities - sum_capital_square -
        (sum_capital_c * sum_capital_c - sum_capital_square) / 2;
  for (i = 0; i < n; i++) {
    if (ind_capital[i] + ind_capital[(i + 1) % n] == 0) {
      res += c[i] * c[(i + 1) % n];
    }
  }
  printf("%lld\n", res);
  return 0;
}
