import sys def main(): input = sys.stdin.readline # 入力 N, T = map(int, input().split()) t = list(map(int, input().split())) K=int(input()) bonus_nodes = set(map(int, input().split())) dp = {0: T} for i in range(1, N): ndp = {} cost = t[i-1] for used, time_left in dp.items(): if time_left <= cost: continue rem = time_left - cost if rem > ndp.get(used, -1): ndp[used] = rem if (i+1) in bonus_nodes and rem >= 1: new_used = used + 1 new_time = rem + 10 if new_time > ndp.get(new_used, -1): ndp[new_used] = new_time dp = ndp if not dp: print("-1") return ans = None for used, time_left in dp.items(): if time_left > 0: if ans is None or used < ans: ans = used if ans is None: print("-1") else: print(ans) if __name__ == '__main__': main()