#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, i, l = 0, sum = 0, ma = 0;
  vector<int> v(100, 0);
  cin >> n >> m >> k;
  for (i = 1; i <= n; i++) cin >> v[i];
  for (i = m; i <= n; i++) {
    if (v[i] <= k && v[i] != 0) {
      l = i;
      break;
    } else {
      sum += 10;
    }
  }
  if (l != 0) ma = sum;
  sum = 0, l = 0;
  for (i = m; i >= 1; i--) {
    if (v[i] <= k && v[i] != 0) {
      l = i;
      break;
    } else {
      sum += 10;
    }
  }
  if (l != 0) {
    if (ma == 0)
      ma = sum;
    else if (sum < ma)
      ma = sum;
  }
  cout << ma << endl;
  return 0;
}
