#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int ar[n];
  for (long long int i = 0; i < n; i++) cin >> ar[i];
  m--;
  long long int ans = 1e18;
  for (long long int i = m + 1; i < n; i++) {
    if (ar[i] != 0 && ar[i] <= k) {
      ans = min(ans, i * 10 - m * 10);
    }
  }
  for (long long int i = m - 1; i >= 0; i--) {
    if (ar[i] != 0 && ar[i] <= k) {
      ans = min(ans, m * 10 - i * 10);
    }
  }
  cout << ans;
}
