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