#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vll = vector<long long>;
using vpii = vector<pair<int, int>>;
using vs = vector<string>;
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int left = 10;
  int left_answer = INT_MAX;
  for (int i = m - 2; i >= 0; i--) {
    if (arr[i] <= k and arr[i] != 0) {
      left_answer = left;
      break;
    }
    left += 10;
  }
  int right = 10;
  int right_answer = INT_MAX;
  for (int i = m; i < n; i++) {
    if (arr[i] <= k and arr[i] != 0) {
      right_answer = right;
      break;
    }
    right += 10;
  }
  cout << min(left_answer, right_answer) << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
}
