#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int a[maxn];
int main(int argc, char const *argv[]) {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  int minv = 0x3f3f3f3f;
  for (int i = m; i >= 1; --i)
    if (a[i] && k >= a[i]) {
      minv = min(minv, (m - i) * 10);
      break;
    }
  for (int i = m + 1; i <= n; ++i)
    if (a[i] && k >= a[i]) {
      minv = min(minv, (i - m) * 10);
      break;
    }
  cout << minv << endl;
  return 0;
}
