#include <bits/stdc++.h>
using namespace std;
int house[10000];
int main() {
  int gf, money, dist, i, j, homes;
  scanf("%d %d %d", &homes, &gf, &money);
  for (i = 1; i <= homes; i++) scanf("%d", &house[i]);
  i = gf + 1;
  j = gf - 1;
  while (1) {
    if (house[i]) {
      if (house[i] <= money) {
        printf("%d\n", (i - gf) * 10);
        return 0;
      }
    }
    if (house[j]) {
      if (house[j] <= money) {
        printf("%d\n", (gf - j) * 10);
        return 0;
      }
    }
    if (i + 1 <= homes) i++;
    if (j > 1) j--;
  }
  return 0;
}
