#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
int main() {
  int n, k;
  cin >> n;
  cin >> k;
  int c[n];
  for (int i = 0; i < n; ++i) cin >> c[i];
  ;
  map<int, int> table;
  vector<long long> capitals;
  long long csum = 0;
  for (int i = 0; i < k; ++i) {
    int id;
    cin >> id;
    id -= 1;
    capitals.push_back(c[id]);
    ;
    ;
    csum += c[id];
    table[id] = 1;
  };
  long long ans = 0;
  long long ncsum = 0;
  for (int i = 0; i < n; ++i) {
    if (table[i] != 1) ncsum += c[i];
  };
  long long dncsum = 0;
  for (int i = 0; i < n; ++i) {
    int right = (i + 1 == n ? 0 : i + 1);
    if (table[i] != 1) {
      if (table[right] != 1) {
        ;
        ;
        dncsum += c[i] * c[right];
      }
    }
  };
  vector<long long> prefix(k);
  for (int i = 0; i < k; ++i) {
    if (i == 0)
      prefix[i] = capitals[i];
    else
      prefix[i] = prefix[i - 1] + capitals[i];
  }
  long long fcsum = 0;
  for (int i = 0; i < k; ++i) {
    fcsum += capitals[i] * (csum - prefix[i]);
    fcsum += capitals[i] * ncsum;
  }
  ans = fcsum + dncsum;
  cout << ans << endl;
  return 0;
}
