#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int main() {
  int n, m, k, a = 0, b = 0, fla = 0, flb = 0;
  cin >> n >> m >> k;
  int *x = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> x[i];
  }
  if (m == 1) {
    a = 10;
    for (int i = 1; i < n; i++) {
      if (x[i] > 0 && x[i] > k)
        a += 10;
      else if (x[i] == 0)
        a += 10;
      else
        break;
    }
    cout << a;
  } else if (m == n) {
    a = 10;
    for (int i = m - 2; i >= 0; i--) {
      if (x[i] > 0 && x[i] > k)
        a += 10;
      else if (x[i] == 0)
        a += 10;
      else
        break;
    }
    cout << a;
  } else {
    a = 10;
    for (int i = m - 2; i >= 0; i--) {
      if (x[i] > 0 && x[i] > k) {
        a += 10;
      } else if (x[i] == 0)
        a += 10;
      else {
        fla = 1;
        break;
      }
    }
    b = 10;
    for (int i = m; i < n; i++) {
      if (x[i] > 0 && x[i] > k) {
        b += 10;
      } else if (x[i] == 0)
        b += 10;
      else {
        flb = 1;
        break;
      }
    }
    if (a > b && flb == 1)
      cout << b;
    else if (a > b && flb == 0)
      cout << a;
    else if (a < b && fla == 1)
      cout << a;
    else if (a < b && fla == 0)
      cout << b;
    else
      cout << a;
  }
  return 0;
}
