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