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