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