#include <bits/stdc++.h>
using namespace std;
int a[100010];
int sum;
int n, q, m;
int main() {
  int i, j, tmp;
  while (scanf("%d", &m) != EOF) {
    scanf("%d", &q);
    for (i = 1; i < m; i++) {
      scanf("%d", &tmp);
      if (tmp < q) {
        q = tmp;
      }
    }
    scanf("%d", &n);
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    sort(a, a + n);
    sum = 0;
    j = n - 1;
    while (j >= q) {
      int k = 0;
      k = j - q;
      while (j > k) {
        sum += a[j];
        j--;
      }
      j -= 2;
    }
    while (j >= 0) {
      sum += a[j];
      j--;
    }
    printf("%d\n", sum);
  }
  return 0;
}
