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