#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; int N, M; double x[101010]; int main() { cin >> N; for (int i = 0; i < N; i++) cin >> x[i]; cin >> M; double S = 0.0; for (int i = 0; i < N; i++) S += x[i]; S /= double(N); double T = 0.0; for (int i = 0; i < N; i++) T += (S - x[i]) * (S - x[i]); T /= double(N); T = sqrt(T); if (abs(T) < 1e-12) { cout << 50 << endl; return 0; } double U = (x[M - 1] - S) * 10 / T; //cout << S << ' ' << T << ' ' << U << endl; double res = 50 + U; cout << ll(res) << endl; }