N, T = map(int, input().split()) t = list(map(int, input().split())) K = int(input()) x = list(map(int, input().split())) clock = [0 for _ in range(N)] for xx in x: clock[xx - 1] += 1 now, c = T, 0 for i in range(N - 1): while now - t[i] <= 0: if c == 0: print(-1) exit() now += 10 c -= 1 now -= t[i] c += clock[i + 1] print(sum(clock) - c)