#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, z, t;
  cin >> x >> y >> z;
  int a[x];
  for (int i = 1; i <= x; i++) {
    cin >> a[i];
    if (i == y) {
      t = i;
    }
  }
  int q = 1000000;
  for (int i = 1; i <= x; i++) {
    if (i == y) {
      continue;
    } else if (a[i] == 0) {
      continue;
    } else if (a[i] <= z) {
      q = min(q, (abs(i * 10 - t * 10)));
    }
  }
  cout << q;
}
