n,rest=map(int,input().split()) t=list(map(int,input().split())) k=int(input()) p=set(map(int,input().split())) need=(sum(t)-rest+1+9)//10 if need>k: print(-1) exit() cnt=0 for i in range(n-1): if rest>t[i]: rest-=t[i] if i+2 in p: rest+=10 cnt+=1 if cnt==need: print(need) exit() else: print(-1) exit() print(0)