#include <bits/stdc++.h>
using namespace std;
int main() {
  int x[100], n, m, k, count = 0, count1 = 0;
  cin >> n >> m >> k;
  m--;
  n--;
  for (int i = 0; i <= n; i++) cin >> x[i];
  for (int i = m; i <= n; i++)
    if (k >= x[i] && x[i] > 0) {
      count = i;
      break;
    } else
      count = 999;
  for (int i = m; i >= 0; i--) {
    if (k >= x[i] && x[i] > 0) {
      count1 = i;
      break;
    } else
      count1 = 999;
  }
  if ((abs(count - m) * 10) < (abs(count1 - m) * 10)) {
    count = abs(m - count);
    count *= 10;
    cout << count;
  } else {
    count1 = abs(m - count1);
    count1 *= 10;
    cout << count1;
  }
  return 0;
}
