#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k, a[100001], i, max = 0, c[1000], b;
  cin >> n >> m >> k;
  for (i = 0; i < n; i++) cin >> a[i];
  a[m - 1] = -1;
  for (i = 0; i < n; i++) {
    if (a[i] > 0 && a[i] <= k) {
      a[i] = -2;
    }
  }
  b = 0;
  for (i = 0; i < n; i++) {
    if (a[i] == -2) {
      max = abs((i) - (m - 1));
      c[b] = max;
      b++;
    }
  }
  sort(c, c + b);
  cout << c[0] * 10 << endl;
  return 0;
}
