#include <bits/stdc++.h>
using namespace std;
int i, n, m, p, d, a, sum, ans;
priority_queue<int, vector<int> > heap;
int main() {
  cin >> m;
  d = INT_MAX;
  for (i = 1; i <= m; i++) {
    cin >> p;
    if (p < d) d = p;
  }
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a;
    heap.push(a);
  }
  while (!heap.empty()) {
    for (i = 1; i <= d && !heap.empty(); i++) {
      ans += heap.top();
      heap.pop();
    }
    if (i == d + 1)
      for (i = 1; i <= 2 && !heap.empty(); i++) heap.pop();
  }
  cout << ans << endl;
}
