#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int a;
  vector<int> q;
  int i;
  for (i = 0; i < n; i++) {
    cin >> a;
    q.push_back(a);
  }
  int r = 1;
  int minl = 10000, minr = 10000;
  for (i = m - 2; i >= 0; i--) {
    if (q[i] <= k && q[i] != 0) {
      minl = 10 * r;
      break;
    }
    r++;
  }
  r = 1;
  for (i = m; i < n; i++) {
    if (q[i] <= k && q[i] != 0) {
      minr = 10 * r;
      break;
    }
    r++;
  }
  cout << min(minl, minr);
}
