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