N, T = map(int, input().split()) t = list(map(int, input().split())) K = int(input()) x = list(map(int, input().split())) x = [a-1 for a in x] x.reverse() cnt = 0 now = T for i in range(N-1): while now - t[i] <= 0: if len(x) == 0: print(-1) exit() xx = x.pop() if xx <= i: cnt += 1 now += 10 else: print(-1) exit() now -= t[i] print(cnt)