#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n, q, t;
  scanf("%d %d", &m, &q);
  for (int i = 1; i < m; i++) {
    scanf("%d", &t);
    if (t < q) q = t;
  }
  scanf("%d", &n);
  vector<int> itens;
  for (int i = 0; i < n; i++) {
    scanf("%d", &t);
    itens.push_back(t);
  }
  sort(itens.begin(), itens.end());
  int total = 0, count = 0;
  for (int i = itens.size() - 1; i >= 0; --i) {
    if (count < q) {
      total += itens[i];
      count++;
    } else {
      count = 0;
      i -= 1;
    }
  }
  printf("%d\n", total);
  return 0;
}
