#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> v(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  m--;
  int p = -1;
  for (int i = m + 1; i < n; i++) {
    if (v[i] != 0 && v[i] <= k) {
      if (p == -1 || abs(m - i) < abs(m - p)) {
        p = i;
      }
    }
  }
  for (int i = m - 1; i >= 0; i--) {
    if (v[i] != 0 && v[i] <= k) {
      if (p == -1 || abs(m - i) < abs(m - p)) {
        p = i;
      }
    }
  }
  cout << abs(m - p) * 10 << endl;
  return 0;
}
