#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) const double EPS = 1e-9; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; vector x(n); REP (i, n) cin >> x[i]; int m; cin >> m; --m; double avg = 0.0; REP (i, n) avg += x[i]; avg /= n; vector diff(n); REP (i, n) diff[i] = (avg - x[i]) * (avg - x[i]); double avg2 = 0; REP (i, n) avg2 += diff[i]; avg2 /= n; avg2 = sqrt(avg2); if (avg2 == 0) cout << 50 << endl; else { double ret = 50 + 10 * (x[m] - avg) / avg2; cout << int(ret + EPS) << endl; } return 0; }