#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, min = 1000100;
  scanf("%i %i %i", &n, &m, &k);
  int *a = (int *)calloc(n, sizeof(int));
  for (int i = 0; i < n; i++) scanf("%i", &a[i]);
  for (int i = 0; i < n; i++) {
    if (i != (m - 1)) {
      if (a[i] <= k && a[i] != 0) {
        if (abs(m - i - 1) * 10 < min) {
          min = abs(m - i - 1) * 10;
        }
      }
    }
  }
  printf("%i", min);
  return 0;
}
