import sys, time, random from collections import deque, Counter, defaultdict def debug(*x):print('debug:',*x, file=sys.stderr) input = lambda: sys.stdin.readline().rstrip() ii = lambda: int(input()) mi = lambda: map(int, input().split()) li = lambda: list(mi()) inf = 2 ** 61 - 1 mod = 998244353 n, t = mi() d = li() k = ii() x = li() clock = [0] * n for i in range(k): clock[x[i] - 1] += 1 cnt = 0 ans = 0 for i in range(n - 1): if clock[i] > 0: cnt += 1 while t - d[i] <= 0: if cnt == 0: print(-1) exit() t += 10 ans += 1 cnt -= 1 t -= d[i] print(ans)