#include using namespace std; int main() { long long N,M; cin >> N; vector X; for(int i = 0; i < N; i++) cin >> X[i]; cin >> M; double num = 0, sum = 0; for(int i = 0; i < N; i++) num += X[i]; num /= N; for(int i = 0; i < N; i++) sum += (X[i] - num) * (X[i] - num); sum /= N; sum = pow(sum, 0.5); if (sum) { num = (X[M - 1] - num) * 10 / sum; cout << (long long) X[M - 1] + num << endl; } else { cout << 50 << endl; } }