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=[] 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]))