#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, right, left;
  scanf("%d %d %d", &n, &m, &k);
  left = 2000;
  right = 2000;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (int j = m - 1; j >= 0; j--) {
    if (a[j] != 0 and a[j] <= k) {
      left = m - 1 - j;
      break;
    }
  }
  for (int j = m; j < n; j++) {
    if (a[j] != 0 and a[j] <= k) {
      right = j - m + 1;
      break;
    }
  }
  printf("%d\n", min(right, left) * 10);
  return 0;
}
