#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int a[maxn];
int c[maxn];
int main() {
  int n;
  cin >> n;
  int m;
  cin >> m;
  long long s = 0;
  long long all = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    all += a[i];
  }
  for (int i = 1; i < n; i++) s += a[i - 1] * a[i];
  s += a[0] * a[n - 1];
  for (int i = 0; i < m; i++) {
    scanf("%d", &c[i]);
    c[i]--;
  }
  long long no = 0;
  for (int i = m - 1; i >= 0; i--) {
    s += a[c[i]] * (all - a[(c[i] - 1 + n) % n] - a[(c[i] + 1) % n] - a[c[i]]);
  }
  for (int i = 0; i < m; i++) {
    if (i == 0) {
      no += a[c[i]];
    } else {
      long long w = no;
      if (c[i] == c[i - 1] + 1) {
        w -= a[c[i - 1]];
      }
      if (c[i] == n - 1 && c[0] == 0) {
        w -= a[0];
      }
      s -= w * a[c[i]];
      no += a[c[i]];
    }
  }
  cout << s << endl;
}
