#include using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; template using V=vector; template using VV=V>; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n,t; cin>>n>>t; V T(n-1); rep(i,n-1) cin>>T[i]; int k; cin>>k; V X(n); rep(i,k){ int x; cin>>x; x--; X[x]=1; } int ans=0,res=0; rep(i,n-1){ if(X[i]) res++; while(res && t-T[i]<=0){ ans++; res--; t+=10; } if(t-T[i]<=0){ cout<<-1<