#include <bits/stdc++.h>
using namespace std;
int a[103];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int minL = 99999999;
  for (int i = m - 1; i >= 1; i--) {
    if (a[i] <= k && a[i] != 0) {
      minL = (m - i) * 10;
      break;
    }
  }
  int minR = 99999999;
  for (int i = m + 1; i <= n; i++) {
    if (a[i] <= k && a[i] != 0) {
      minR = (i - m) * 10;
      break;
    }
  }
  cout << min(minL, minR) << endl;
  return 0;
}
