#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K;
  long long int C[200000] = {0};
  bool capital[200000] = {0};
  long long int C_sum = 0;
  long long int capital_sum = 0;
  cin >> N >> K;
  for (int i = 0; i < N; i++) {
    cin >> C[i];
    C_sum += C[i];
  }
  for (int i = 0; i < K; i++) {
    int x;
    cin >> x;
    capital[x - 1] = true;
    capital_sum += C[x - 1];
  }
  long long int result = 0;
  for (int i = 0; i < N; i++) {
    if (capital[i] == true) {
      result = result + C[i] * C_sum - C[i] * C[i];
    } else {
      result = result + C[i] * capital_sum;
      int previous = (i - 1 + N) % N;
      int next = (i + 1) % N;
      if (capital[previous] == false) {
        result += C[i] * C[previous];
      }
      if (capital[next] == false) {
        result += C[i] * C[next];
      }
    }
  }
  cout << result / 2;
  return 0;
}
