#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  long long b[n + 1];
  bool caps[n + 1];
  long long total = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> b[i];
    total += b[i];
    caps[i] = false;
  }
  long long capSum = 0;
  for (long long i = 1; i <= k; i++) {
    long long cap;
    cin >> cap;
    caps[cap] = true;
    capSum += b[cap];
  }
  long long sum = 0;
  for (long long i = 1; i <= n; i++) {
    if (caps[i]) {
      long long newSum = total - b[i];
      sum += newSum * b[i];
      capSum -= b[i];
      sum -= b[i] * capSum;
    } else {
      long long next = (i == n) ? 1 : i + 1;
      if (!caps[next]) {
        sum += b[i] * b[next];
      }
    }
  }
  cout << sum;
}
