#include <bits/stdc++.h>
using namespace std;
int ara[105];
int main() {
  int i, j, k;
  int n, m;
  cin >> n >> m >> k;
  for (i = 0; i < n; ++i) scanf("%d", &ara[i]);
  int mn = 50000000;
  for (i = m - 1, j = 0; i >= 0; --i, j += 10)
    if (ara[i] != 0 && ara[i] <= k) mn = min(mn, j);
  for (i = m - 1, j = 0; i < n; ++i, j += 10)
    if (ara[i] != 0 && ara[i] <= k) mn = min(mn, j);
  cout << mn << endl;
}
