#include <bits/stdc++.h>
using namespace std;
vector<int> *v;
int main() {
  int t, m, n, i, j, k;
  int x, y;
  scanf("%d%d", &n, &m);
  int a[n], h[n];
  for (i = 0; i < (n); i++) scanf("%d", &a[i]);
  memset(h, 0, sizeof(h));
  for (i = 0; i < (m); i++) {
    scanf("%d", &j);
    h[j - 1] = 1;
  }
  long long int ans = 0, tmp = 0;
  for (i = 0; i < (n); i++) {
    if (!h[i])
      ans += a[i];
    else if (a[i] > tmp)
      tmp = a[i];
  }
  if (tmp > ans) {
    ans += tmp;
    ans = ans << (m - 1);
  } else
    ans = ans << m;
  cout << ans << "\n";
  return 0;
}
