#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int ans = 31578;
  m--;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a > 0 && a <= k) ans = min(ans, abs(m - i));
  }
  cout << 10 * ans;
}
