INF = float("inf") N, T = map(int, input().split()) t_list = list(map(int, input().split())) K = int(input()) x_set = set(map(int, input().split())) def check(n): time = T cnt = 0 for i, t in enumerate(t_list, start=1): if cnt < n and i in x_set: time += 10 cnt += 1 time -= t if time <= 0: return False return True ok, ng = K + 1, -1 while abs(ok - ng) > 1: mid = (ok + ng) // 2 if check(mid): ok = mid else: ng = mid print(ok if ok <= K else -1)