#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int a[101];
int main(void) {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
  }
  int leftmin = 9999999;
  int rightmin = 9999999;
  for (int i = m - 1; i > 0; i--) {
    if (a[i] != 0 && a[i] <= k) {
      leftmin = m - i;
      break;
    }
  }
  for (int i = m + 1; i <= n; i++) {
    if (a[i] != 0 && a[i] <= k) {
      rightmin = i - m;
      break;
    }
  }
  int ans = min(leftmin, rightmin);
  printf("%d", ans * 10);
  return 0;
}
