#include <bits/stdc++.h>
using namespace std;
unsigned long long int power(unsigned long long int a,
                             unsigned long long int b) {
  if (b == 0) return 1;
  if (b & 1) return a * power(a, b - 1);
  unsigned long long int temp = power(a, b / 2);
  return temp * temp;
}
bool mycompare(unsigned long long int a, unsigned long long int b) {
  return a > b;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) {
    int index;
    cin >> index;
    a[index] = -a[index];
  }
  unsigned long long int points = 0;
  vector<int> b;
  for (int i = 1; i <= n; i++) {
    if (a[i] > 0)
      points += a[i];
    else
      b.push_back(-a[i]);
  }
  sort(b.begin(), b.end());
  int s = b.size();
  if (b[s - 1] > points)
    points += b[s - 1];
  else
    points += points;
  points = power(2, m - 1) * points;
  cout << points;
}
