n=gets.to_i x=gets.split.map &:to_i m=1.*x.sum/n s=(x.map{|y|(y-m)**2}.sum/n)**0.5 p (50+10*(x[gets.to_i-1]-m)/(s>0? s:1)).floor