#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int arr[n + 1];
  for (int i = 0; i < n; ++i) cin >> arr[i];
  int pos1 = -1, pos2 = -1, ret;
  for (int i = m; i < n; ++i) {
    if (arr[i] <= k && arr[i] != 0) {
      pos1 = i;
      break;
    }
  }
  for (int i = m - 2; i >= 0; --i) {
    if (arr[i] <= k && arr[i] != 0) {
      pos2 = i;
      break;
    }
  }
  if (pos1 != -1) {
    ret = pos1 - (m - 1);
    ret = ret * 10;
  }
  if (pos2 != -1) {
    ret = min(ret, (m - 1 - pos2) * 10);
  }
  int a = ret;
  cout << a << '\n';
}
