#include <bits/stdc++.h>
using namespace std;
const int maxn = 111;
inline int read() {
  char ch = getchar();
  int x = 0;
  while (!isdigit(ch)) ch = getchar();
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return x;
}
int n, m, a[maxn], p[maxn], x;
void init() {
  n = read();
  m = read();
  x = 0;
  for (int i = 1; i <= n; ++i) a[i] = read();
  for (int i = 1; i <= m; ++i) p[i] = a[read()];
  for (int i = 1; i <= n; ++i) x += a[i];
  for (int i = 1; i <= m; ++i) x -= p[i];
}
void work() {
  int t = 0;
  for (int i = 1; i <= m; ++i) t = max(t, p[i]);
  if (x < t)
    printf("%I64d\n", 1LL * (x + t) << (m - 1));
  else
    printf("%I64d\n", 1LL * x << m);
}
int main() {
  init();
  work();
  return 0;
}
