#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef pair<int,int> pint;

#define DE 1
#define FI first
#define SE second
#define PB push_back
#define MP make_pair
#define ALL(s) (s).begin(),(s).end()
#define REP(i,n) for (int i = 0; i < (int)(n); ++i)
#define EACH(i,s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<<endl

template<class T1, class T2> ostream& operator<<(ostream &s, pair<T1,T2> P){return s<<'<'<<P.first<<", "<<P.second<<'>';}
template<class T> ostream& operator<<(ostream &s, vector<T> P) {s<<"{ ";for(int i=0;i<P.size();++i){if(i>0)s<<", ";s<<P[i];}return s<<" }"<<endl;}
template<class T1, class T2> ostream& operator<<(ostream &s, map<T1,T2> P) {s<<"{ ";for(__typeof__(P.begin()) it=P.begin();it!=P.end();++it){if(it!=P.begin())s<<", ";s<<'<'<<it->first<<"->"<<it->second<<'>';}return s<<" }"<<endl;}





const ll INF = 1LL<<50;
const int MAX_V = 20;

template<class T> struct Edge {
    int from, to;
    T cost;
    Edge(int f, int t, T c) : from(f), to(t), cost(c) {}
    friend bool operator < (const Edge &e1, const Edge &e2) {return e1.cost < e2.cost;}
    friend bool operator > (const Edge &e1, const Edge &e2) {return e1.cost > e2.cost;}
};

template<class T> struct Graph {
    int V,E;
    vector<Edge<T> > list[MAX_V];
    
    Graph(int n = 0) : V(n), E(0) {}
    void init(int n = 0) {V = n; E = 0; for (int i = 0; i < MAX_V; ++i) list[i].clear();}
    inline vector<Edge<T> >& operator [] (int i) {return list[i];}
    
    void direct(int f, int t, T c) {
        ++E;
        list[f].push_back(Edge<T>(f,t,c));
    }
};


ll dist[MAX_V];
template<class T> bool BellmanFord(Graph<T> &G, int s) {
    fill(dist, dist+G.V, INF);
    dist[s] = 0;
    for (int i = 0; i <= G.V; ++i) {
        bool finish = true;
        for (int i = 0; i < G.V; ++i) {
            if (dist[i] != INF) {
                for (int j = 0; j < G[i].size(); ++j) {
                    Edge<T> e = G[i][j];
                    if (dist[e.to] > dist[i] + e.cost) {
                        dist[e.to] = dist[i] + e.cost;
                        finish = false;
                    }
                }
            }
        }
        if (finish) return true;
    }
    return false;
}


Graph<ll> G;

int n, m;
ll Dist;
ll S[MAX_V], D[MAX_V];

bool caninter[MAX_V][MAX_V];
int place[MAX_V][MAX_V];

ll solve() {
    Graph<ll> nG = G;
    for (int i = 0; i < n; ++i) {
        for (int j = i+1; j < n; ++j) {
            if (place[i][j] == -1) {
                ll d = (S[j] - S[i]) * Dist;
                nG.direct(i, j, d);
            }
            else {
                int k = place[i][j];
                ll d = (S[i] - S[j]) * D[k];
                nG.direct(j, i, d);
                nG.direct(i, j, -d);
            }
        }
    }
    
    bool ok = BellmanFord(nG, 0);
    if (ok) {
        ll Max = -1;
        for (int i = 0; i < n; ++i) {
            Max = max(Max, -dist[i] + S[i] * Dist);
        }
        return Max;
    }
    return INF;
}


ll res = INF;
void dfs(int i, int j) {
    if (i == n-1) {
        bool ok = true;
        set<int> se[MAX_V];
        for (int k = 0; k < n; ++k) {
            for (int l = k+1; l < n; ++l) {
                int p = place[k][l];
                if (p == -1) continue;
                if (se[p].count(k) || se[p].count(l)) ok = false;
                else {se[p].insert(k); se[p].insert(l);}
            }
        }
        if (ok) {
            ll temp = solve();
            res = min(res, temp);
        }
        return;
    }
    else if (j == n) {
        dfs(i+1, i+2);
        return;
    }
    
    dfs(i, j+1);
    if (caninter[i][j]) {
        for (int k = 0; k < m; ++k) {
            place[i][j] = k;
            dfs(i, j+1);
            place[i][j] = -1;
        }
    }   
}

int main() {
    while (cin >> Dist) {
        cin >> n; for (int i = 0; i < n; ++i) cin >> S[i];
        cin >> m; for (int i = 0; i < m; ++i) cin >> D[i];
        
        G.init(n);
        for (int i = 0; i < n-1; ++i) G.direct(i, i+1, -1);
        
        memset(caninter, 0, sizeof(caninter));
        for (int i = 0; i < n; ++i) {
            for (int j = i+1; j < n; ++j) {
                if (S[i] > S[j]) caninter[i][j] = true;
            }
        }
        
        memset(place, -1, sizeof(place));
        res = INF;
        dfs(0, 1);
        
        cout << res << endl;
    }
    
    return 0;
}


Measured memory_bytes: 1224