#include <bits/stdc++.h>
using namespace std;
int N, K;
int beauty[100000];
bool capital[100000];
int main() {
  long long non_capital_beauty = 0;
  long long capital_beauty = 0;
  scanf("%d %d", &N, &K);
  for (int i = 0; i < N; i++) {
    scanf("%d", &beauty[i]);
    non_capital_beauty += beauty[i];
  }
  for (int i = 0; i < K; i++) {
    int tmp;
    scanf("%d", &tmp);
    capital[tmp - 1] = true;
    capital_beauty += beauty[tmp - 1];
    non_capital_beauty -= beauty[tmp - 1];
  }
  long long ans = 0;
  long long a, b;
  a = b = 0;
  for (int i = 0; i < N; i++) {
    if (capital[i]) {
      a += beauty[i] * non_capital_beauty;
      b += beauty[i] * (capital_beauty - beauty[i]);
    }
  }
  ans += a + (b / 2);
  for (int i = 0; i < N - 1; i++) {
    if (!capital[i] && !capital[i + 1]) {
      ans += beauty[i] * beauty[i + 1];
    }
  }
  if (!capital[N - 1] && !capital[0]) ans += beauty[N - 1] * beauty[0];
  cout << ans << endl;
}
