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