#include <bits/stdc++.h>
using namespace std;
vector<int> vi;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vi.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> vi[i];
  }
  int one = 99999999, two = 99999999;
  for (int i = m; i < n; ++i) {
    if (vi[i] <= k && vi[i] != 0) {
      one = i;
      break;
    }
  }
  for (int i = m - 2; i >= 0; --i) {
    if (vi[i] <= k && vi[i] != 0) {
      two = i;
      break;
    }
  }
  int dist1, dist2;
  m--;
  dist2 = abs(two - m);
  dist1 = abs(one - m);
  cout << min(dist1, dist2) * 10 << endl;
  return 0;
}
