#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, b, m, n, x, y, a[200], s[200];
  while (cin >> n) {
    cin >> m >> b;
    x = 1;
    for (i = 1; i <= n; i++) {
      cin >> a[i];
      if (a[i] != 0 && a[i] <= b) {
        s[x++] = i * 10;
      }
    }
    j = 1000;
    if (m != 0) m = m * 10;
    for (i = 1; i < x; i++) {
      y = abs(s[i] - m);
      if (y < j) j = y;
    }
    cout << j << endl;
  }
  return 0;
}
