#include <bits/stdc++.h>
using namespace std;
int n, m, q, x, r, z, a[100010];
int main() {
  ios::sync_with_stdio(0);
  cin >> m >> q;
  for (int i = 1; i < m; ++i) {
    cin >> x;
    q = min(q, x);
  }
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a, a + n, greater<int>());
  z = q;
  for (int i = 0; i < n; ++i) {
    if (i % (q + 2) < q) {
      r += a[i];
    }
  }
  cout << r;
}
