#include #include #include #include using ldouble = long double; constexpr ldouble EPS = 1e-10; void solve() { int n; std::cin >> n; std::vector xs(n); for (auto& x : xs) std::cin >> x; ldouble ave = std::accumulate(xs.begin(), xs.end(), 0.L) / n; ldouble sv = std::sqrt(std::accumulate(xs.begin(), xs.end(), 0.L, [&](ldouble acc, ldouble x) { return acc + (x - ave) * (x - ave); }) / n); if (sv < EPS) { std::cout << 0 << "\n"; return; } int m; std::cin >> m; ldouble x = xs[--m]; ldouble ans = (x - ave) * 10 / sv + 50; std::cout << (int)ans << "\n"; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }