Problem: Finally Fox Ciel arrived in front of her castle!

She have to type a password to enter her castle. An input device attached to her castle is a bit unusual.

The input device is a 1 × n rectangle divided into n square panels. They are numbered 1 to n from left to right. Each panel has a state either ON or OFF. Initially all panels are in the OFF state. She can enter her castle if and only if x1-th, x2-th, ..., xk-th panels are in the ON state and other panels are in the OFF state.

She is given an array a1, ..., al. In each move, she can perform the following operation: choose an index i (1 ≤ i ≤ l), choose consecutive ai panels, and flip the states of those panels (i.e. ON → OFF, OFF → ON).

Unfortunately she forgets how to type the password with only above operations. Determine the minimal number of operations required to enter her castle.

Input

The first line contains three integers n, k and l (1 ≤ n ≤ 10000, 1 ≤ k ≤ 10, 1 ≤ l ≤ 100), separated by single spaces.

The second line contains k integers x1, ..., xk (1 ≤ x1 < x2 < ... < xk ≤ n), separated by single spaces.

The third line contains l integers a1, ..., al (1 ≤ ai ≤ n), separated by single spaces. It is possible that some elements of the array ai are equal value.

Output

Print the minimal number of moves required to type the password. If it's impossible, print -1.

Examples

Input

10 8 2
1 2 3 5 6 7 8 9
3 5


Output

2


Input

3 2 1
1 2
3


Output

-1

Note

One possible way to type the password in the first example is following: In the first move, choose 1st, 2nd, 3rd panels and flip those panels. In the second move, choose 5th, 6th, 7th, 8th, 9th panels and flip those panels.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int oo = 100000000;
int d[1 << 21];
bool flag[1 << 21];
int que[1000000];
int x[25], a[105], b[10005];
int A[10005], B[10005];
int n, m, k, cnt, num;
int dist[25][10005];
int L[25], R[25];
int main() {
  scanf("%d%d%d", &n, &m, &k);
  int mode = 0;
  for (int i = 0, prev = 0, now; i < m; i++) {
    scanf("%d", &now);
    if (now - 1 > prev) x[cnt++] = now - 1 - prev, mode *= 2;
    x[cnt++] = 1;
    mode = mode * 2 + 1;
    prev = now;
    if (i == m - 1 && prev < n) x[cnt++] = n - prev, mode *= 2;
  }
  for (int i = 0; i < cnt / 2; i++) swap(x[i], x[cnt - 1 - i]);
  x[cnt] = 1;
  for (int i = 0, s = 0; i <= cnt; s += x[i++]) L[i] = s + 1, R[i] = s + x[i];
  for (int i = 0; i < k; i++) scanf("%d", &a[i]);
  for (int i = 0; i < cnt; i++) {
    for (int j = 1; j <= n + 1; j++) dist[i][j] = oo;
    dist[i][L[i]] = 0;
    que[0] = L[i];
    for (int l = 0, r = 0; l <= r; l++)
      for (int j = 0; j < k; j++) {
        if (que[l] + a[j] <= n + 1 && dist[i][que[l] + a[j]] == oo) {
          que[++r] = que[l] + a[j];
          dist[i][que[r]] = dist[i][que[l]] + 1;
        }
        if (que[l] - a[j] > 0 && dist[i][que[l] - a[j]] == oo) {
          que[++r] = que[l] - a[j];
          dist[i][que[r]] = dist[i][que[l]] + 1;
        }
      }
  }
  for (int i = 0; i < (1 << cnt); i++) d[i] = oo;
  d[0] = 0;
  flag[0] = 1;
  que[0] = 0;
  int r = 0;
  for (int l = 0; l <= r; flag[que[l++]] = 0)
    if (d[que[l]] + 1 < d[mode]) {
      int now = que[l], v = d[que[l]];
      for (int i = 0, ss = 0; i < cnt; i++) {
        ss += x[i];
        if (!((mode & (1 << i)) ^ (now & (1 << i)))) continue;
        int tmp = 0;
        for (int j = i; j < cnt; ss += x[++j]) {
          tmp += (1 << j);
          if (d[now ^ tmp] > v + dist[i][ss + 1]) {
            d[now ^ tmp] = v + dist[i][ss + 1];
            if (!flag[now ^ tmp]) {
              que[++r] = now ^ tmp;
              flag[que[r]] = 1;
            }
          }
        }
        break;
      }
    }
  if (d[mode] == oo)
    printf("-1\n");
  else
    printf("%d\n", d[mode]);
}