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