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