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