#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, a;
  vector<int> v;
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    if (a != 0 && a <= k) {
      v.push_back(10 * abs(i + 1 - m));
    }
  }
  sort(v.begin(), v.end());
  printf("%d\n", v[0]);
}
