#include <bits/stdc++.h>
using namespace std;
template <class T>
using vv = vector<vector<T>>;
template <class T>
ostream &operator<<(ostream &os, const vector<T> &t) {
  os << "{";
  for (int(i) = 0; (i) < (t.size()); ++(i)) {
    os << t[i] << ",";
  }
  os << "}" << endl;
  return os;
}
template <class S, class T>
ostream &operator<<(ostream &os, const pair<S, T> &t) {
  return os << "(" << t.first << "," << t.second << ")";
}
template <class T>
inline bool MX(T &l, const T &r) {
  return l < r ? l = r, 1 : 0;
}
template <class T>
inline bool MN(T &l, const T &r) {
  return l > r ? l = r, 1 : 0;
}
const long long MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(0);
  int n, m;
  cin >> n >> m;
  vector<long long> c(n);
  for (int(i) = 0; (i) < (n); ++(i)) cin >> c[i];
  long long s = accumulate((c).begin(), (c).end(), 0ll);
  for (int(i) = 0; (i) < (2); ++(i))
    for (int(j) = 0; (j) < (n); ++(j)) c.push_back(c[j]);
  vector<int> d(m);
  for (int(i) = 0; (i) < (m); ++(i)) cin >> d[i], --d[i];
  long long re = 0;
  for (int(i) = 0; (i) < (n); ++(i)) re += c[i] * c[i + 1];
  for (int i : d) re += c[i] * (s - c[i] - c[i + 1] - c[i + n - 1]);
  long long sum = 0;
  for (int i : d) sum += c[i];
  sum *= sum;
  for (int i : d) sum -= c[i] * c[i];
  sum /= 2;
  vector<int> cap(2 * n);
  for (int i : d) cap[i] = cap[i + n] = 1;
  for (int(i) = 0; (i) < (n); ++(i))
    if (cap[i] && cap[i + 1]) sum -= c[i] * c[i + 1];
  re -= sum;
  cout << re << endl;
  return 0;
}
