#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int a[n + 1];
  for (long long int i = 1; i <= n; i++) cin >> a[i];
  long long int c1 = INT_MAX, c2 = INT_MAX;
  for (long long int i = m - 1; i >= 1; i--) {
    if (a[i] && a[i] <= k) {
      c1 = (m - i) * 10;
      break;
    }
  }
  for (long long int i = m + 1; i <= n; i++) {
    if (a[i] && a[i] <= k) {
      c2 = (i - m) * 10;
      break;
    }
  }
  cout << min(c1, c2) << endl;
  return 0;
}
