#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  long long cur = 0;
  cin >> n >> m;
  vector<int> v(n), a(m);
  for (int &x : v) cin >> x, cur += x;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    a[i] = v[x - 1];
    cur -= a[i];
  }
  sort(a.begin(), a.end());
  if (m != 0) {
    if (cur > a[m - 1]) {
      cur *= (1 << m);
    } else {
      cur += a[m - 1];
      cur *= (1 << m - 1);
    }
  }
  cout << cur;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
