#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  int mn = INT_MAX;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (i != m && x != 0 && x <= k) {
      mn = min(mn, abs(i - m));
    }
  }
  cout << mn * 10;
}
