#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int arr[n];
  for (auto &x : arr) cin >> x;
  int ctr = 0;
  m -= 1;
  for (int i = 1;; i++) {
    if (m - i < 0 && m + i >= n) break;
    if (m - i >= 0 && arr[m - i] != 0 && arr[m - i] <= k) {
      ctr = i;
      break;
    }
    if (m + i < n && arr[m + i] != 0 && arr[m + i] <= k) {
      ctr = i;
      break;
    }
  }
  cout << ctr * 10;
}
