import sequtils,strutils,algorithm proc q():any=stdin.readLine proc R():any=q().split.map(parseInt).sorted cmp var n=q().parseInt A=R() m=q().parseInt+1 B=R().reversed a=m for _ in 0..=A[i]:(T[j]-=A[i];i+=1)else:j+=1);a=a.min j+1;A.nextPermutation) if a