#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int t[n + 1];
  int h = 99999;
  for (int i = 1; i < n + 1; i++) {
    cin >> t[i];
    if (t[i] != 0)
      if (t[i] <= k && abs(m - i) < abs(m - h)) h = i;
  }
  cout << abs(m - h) * 10;
  return 0;
}
