#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long double x[100010]; int main() { long double n; int m; cin >> n; long double sum = 0; for (int i = 0; i < n; i++) { cin >> x[i]; sum += x[i]; } sum /= n; long double sum1 = 0; for (int i = 0; i < n; i++) { sum1 += (sum - x[i]) * (sum - x[i]); } sum1 /= n; sum1 = sqrt(sum1); cin >> m; long double ans; if (sum1 == 0) { cout << "50" << endl; return 0; } long double z = 10; ans = abs(x[m - 1] - sum) * z / sum1; if (x[m - 1] > sum) { cout << floor(50 + ans) << endl; } else { if (50 - ans >= 0) { cout << floor(50 - ans) << endl; } else { cout << ceil(50 - ans) << endl; } } return 0; }