#include <bits/stdc++.h>
int main() {
  int n, m, k, A[101], i, res1 = 0, res2 = 0, restmp = 0;
  scanf("%d%d%d", &n, &m, &k);
  for (i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
    if (A[i] > k) A[i] = 0;
  }
  for (i = m; i >= 1; i--) {
    if (A[i] != 0) {
      res1 = 1;
      break;
    }
    restmp++;
  }
  if (res1 == 1) res1 = restmp;
  restmp = 0;
  for (i = m; i <= n; i++) {
    if (A[i] != 0) {
      res2 = 1;
      break;
    }
    restmp++;
  }
  if (res2 == 1) res2 = restmp;
  if (res1 == 0)
    printf("%d", res2 * 10);
  else if (res2 == 0)
    printf("%d", res1 * 10);
  else if (res1 < res2) {
    printf("%d", res1 * 10);
  } else if (res1 >= res2)
    printf("%d", res2 * 10);
  return 0;
}
