#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000;
int n, m, data[maxn], sum = 0, nb = 0;
int main() {
  cin >> m;
  for (int i = 0; i < m; i++) cin >> data[i];
  int q = *min_element(data, data + m);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> data[i], sum += data[i];
  sort(data, data + n, greater<int>());
  for (int i = 0; i < n; i++)
    if (i % (q + 2) == q || i % (q + 2) == q + 1) nb += data[i];
  cout << sum - nb << endl;
  return 0;
}
