#include <bits/stdc++.h>
int main() {
  int a[101] = {0}, n, m, k, i, j, w = 0, z = 0;
  scanf("%d%d%d", &n, &m, &k);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 1; i < m; i++) {
    if (a[i] == 0)
      continue;
    else if (k >= a[i])
      w = i;
  }
  for (i = n; i > m; i--) {
    if (a[i] == 0)
      continue;
    else if (k >= a[i])
      z = i;
  }
  if (w == 0)
    printf("%d", 10 * (z - m));
  else if (z == 0)
    printf("%d", 10 * (m - w));
  else {
    k = m - w;
    j = z - m;
    printf("%d", 10 * (k < j ? k : j));
  }
  return 0;
}
