#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m, k, a, minn = 10000;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a != 0 && a <= k) {
      if (i > m - 1)
        minn = min(minn, i + 1 - m);
      else
        minn = min(minn, m - 1 - i);
    }
  }
  cout << minn * 10 << endl;
  return 0;
}
