#include using namespace std; using ll = long long; int main(){ int N, M; cin >> N; vector x(N); for(int i = 0; i < N; i++)cin >> x[i]; cin >> M; ll Ave = accumulate(x.begin(), x.end(), 0ll), S = 0; for(int i = 0; i < N; i++){ S += (N * x[i] - Ave) * (N * x[i] - Ave); } if(S == 0){ cout << 50 << endl; return 0; } if(N * x[M - 1] >= Ave){ auto f = [&](ll v){ ll d = (N * x[M - 1] - Ave) * 10; d *= d * N; return (v * v * S <= d); }; ll ok = 0, ng = 100; while(ok + 1 < ng){ ll m = (ok + ng) / 2; if(f(m))ok = m; else ng = m; } cout << 50 + ok << endl; }else{ auto f = [&](ll v){ ll d = (N * x[M - 1] - Ave) * 10; d *= d * N; return (v * v * S >= d); }; ll ng = 0, ok = 100; while(ng + 1 < ok){ ll m = (ok + ng) / 2; if(f(m))ok = m; else ng = m; } cout << 50 - ok << endl; } }