#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int main() {
  cin >> n >> m >> k;
  int ans = 10000;
  for (int i = 1; i <= n; i++) {
    int val;
    cin >> val;
    if (val > 0 && val <= k) ans = min(ans, abs(m - i));
  }
  cout << ans * 10 << endl;
  return 0;
}
