#include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<int> houses;
int main() {
  cin >> n >> m >> k;
  m--;
  houses.resize(n);
  for (int i = 0; i < n; i++) cin >> houses[i];
  int leftPos = m, rightPos = m;
  int ans = -1, ansCost = 0;
  while (ans == -1) {
    leftPos--;
    rightPos++;
    if (leftPos >= 0)
      if (houses[leftPos] <= k && houses[leftPos]) ans = leftPos;
    if (rightPos < n)
      if (houses[rightPos] <= k && houses[rightPos]) ans = rightPos;
  }
  cout << abs(m - ans) * 10;
  return 0;
}
