#include <bits/stdc++.h>
using namespace std;
istream &operator>>(istream &in, vector<int> &v) {
  for (auto &e : v) {
    int c;
    in >> c;
    e = c == 0 ? 100000 : c;
  }
  return in;
}
ostream &operator<<(ostream &out, vector<int> &v) {
  for (auto &e : v) out << e;
  return out;
}
int main() {
  int n, m, k, ans = 0;
  cin >> n >> m >> k;
  m--;
  vector<int> cost(n);
  cin >> cost;
  auto i = m, j = m;
  while (true) {
    if (cost[i] <= k) {
      ans = (m - i) * 10;
      break;
    }
    if (cost[j] <= k) {
      ans = (j - m) * 10;
      break;
    }
    if (i == 0 && j == n - 1) break;
    if (i - 1 > -1) i--;
    if (j + 1 < n) j++;
  }
  cout << ans << '\n';
  return 0;
}
