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