#include <bits/stdc++.h>
using namespace std;
const int MXN = 2e6 + 30;
const int MAXN = 1e3 + 2;
const long long INF = 1e9 + 7;
const long long BINF = 1e15;
const int MOD = 1e9 + 7;
const long double EPS = 1e-15;
const long long dx[] = {0, 0, 1, -1};
const long long dy[] = {1, -1, 0, 0};
int n, m, k;
int a[MXN];
int mn = INF;
int pos;
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] != 0 && a[i] <= k) {
      if (mn > abs(m - i)) {
        mn = abs(m - i);
        pos = i;
      }
    }
  }
  cout << mn * 10;
  return 0;
}
