n,t=map(int,input().split()) L=list(map(int,input().split())) k=int(input()) A=list(map(int,input().split())) ans=10**6 for bit in range(2**k): tmp=[] cnt=0 for i in range(k): if bit>>i&1: cnt+=1 tmp.append(A[i]) tmp=tmp[::-1] T=t now=0 flag=1 for i in range(n-1): if tmp: if tmp[-1]==i: tmp.pop() T+=10 T-=L[i] if T<=0: flag=0 break if flag: ans=min(ans,cnt) print(ans if ans<10**6 else -1)