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