#include <bits/stdc++.h>
using namespace std;
int a[105];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int res1 = (int)1e6, res2 = (int)1e6;
  for (int i = m; i <= n; i++)
    if (a[i] && k >= a[i]) {
      res1 = (i - m) * 10;
      break;
    }
  for (int i = m; i >= 1; i--)
    if (a[i] && k >= a[i]) {
      res2 = (m - i) * 10;
      break;
    }
  cout << min(res1, res2);
  return 0;
}
