#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> a;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  int temp1 = INT_MAX, temp2 = INT_MAX;
  for (int i = m - 2; i >= 0; i--) {
    if (a[i] <= k && a[i]) {
      temp1 = i;
      break;
    }
  }
  for (int i = m; i < a.size(); i++) {
    if (a[i] <= k && a[i]) {
      temp2 = i;
      break;
    }
  }
  temp1++;
  temp2++;
  temp1 = abs(temp1 - m);
  temp2 = abs(temp2 - m);
  m = min(temp1, temp2);
  cout << m * 10;
}
