#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int vet[500];
  vet[0] = 0;
  vet[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &vet[i]);
  }
  int best = 100000000;
  for (int i = m + 1; i <= n; i++) {
    if (vet[i] == 0) continue;
    if (vet[i] <= k) {
      best = i - m;
      break;
    }
  }
  for (int i = m - 1; i >= 1; i--) {
    if (vet[i] == 0) continue;
    if (vet[i] <= k) {
      if (m - i < best) best = m - i;
      break;
    }
  }
  cout << best * 10 << endl;
}
