#include <bits/stdc++.h>
using namespace std;
const int maxk = 2600;
const int maxn = 50 + 17;
const int inf = 1e9;
int val[maxn], dp[maxn][maxk];
char col[maxn];
int main() {
  int n, s, k;
  cin >> n >> s >> k;
  for (int i = 1; i <= n; ++i) cin >> val[i];
  for (int i = 1; i <= n; ++i) cin >> col[i];
  for (int i = 0; i < maxk; ++i)
    for (int j = 0; j < maxn; ++j) dp[j][i] = inf;
  for (int i = 1; i <= n; ++i) dp[i][val[i]] = abs(s - i);
  for (int w = 0; w <= k + 50; ++w)
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= n; ++j)
        if (col[i] != col[j] && val[i] < val[j] && dp[i][w] != inf)
          dp[j][w + val[j]] = min(dp[j][w + val[j]], dp[i][w] + abs(i - j));
  int res = inf;
  for (int i = 1; i <= n; ++i)
    for (int j = k; j < maxk; ++j) res = min(res, dp[i][j]);
  if (res == inf) res = -1;
  cout << res;
}
