n=int(input()) x=list(map(int,input().split())) m=int(input()) ave=sum(x)/n xx=[] for i in x: xx.append((i-ave)**2) bunsan=sum(xx)/n hyojunhensa=bunsan**0.5 hensachi=[] if hyojunhensa==0: print(50) else: for i in x: tmp=abs(i-ave)*10 tmp/=hyojunhensa if (i-ave)<0: tmp*=-1 hensachi.append(50+tmp) print(int(hensachi[m-1]))