#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int houses[110];
  for (int i = 1; i <= n; i++) {
    cin >> houses[i];
  }
  int res = INT_MAX;
  for (int i = 1; i <= n; i++) {
    if (houses[i] != 0 && houses[i] <= k) {
      res = min(res, abs(m - i) * 10);
    }
  }
  cout << res << '\n';
  return 0;
}
