import java.util.*; import java.lang.*; import java.io.*; public class Main { public static void main (String[] args) throws java.lang.Exception { // your code goes here // 入力 Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] X = new int[N]; int totalX = 0; for(int i = 0; i < N; i++){ X[i] = sc.nextInt(); totalX += X[i]; } int M = sc.nextInt(); // 途中計算 double ave = (double)totalX / N; //System.out.print("ave = "); //System.out.println(ave); double[] dif = new double[N]; double totalDif = 0; for(int i = 0; i < N; i++){ dif[i] = (X[i] - ave) * (X[i] - ave); totalDif += dif[i]; } double difAve = Math.sqrt(totalDif / N); //System.out.print("totalDif = "); //System.out.println(totalDif); //System.out.print("difAve = "); //System.out.println(difAve); // 偏差値算出 int result = 0; if(difAve == 0){ result = 50; }else{ int score = X[M-1]; double tmp = (score - ave) * 10 / difAve; result = (int)(50 + tmp); //System.out.print("score = "); //System.out.println(score); //System.out.print("tmp = "); //System.out.println(tmp); } // 出力 System.out.println(result); } }