#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const long long mod = (long long)1e9 + 7;
const double eps = (double)1e-9;
const double pi = acos(-1.0);
const int dx[] = {0, 0, 1, 0, -1};
const int dy[] = {0, 1, 0, -1, 0};
const int N = 55;
const int M = 2505;
char c[N];
int n, m, st, lim, ans, a[N], p[N], dp[N][M];
inline bool cmp(int i, int j) { return a[i] < a[j]; }
int main() {
  cin >> n >> st >> lim;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    m += a[i];
  }
  for (int i = 1; i <= n; i++) cin >> c[i];
  for (int i = 1; i <= n; i++) p[i] = i;
  sort(p + 1, p + 1 + n, &cmp);
  for (int i = 1; i <= n; i++)
    for (int j = 0; j <= m; j++) dp[i][j] = inf;
  for (int i = 1; i <= n; i++) dp[i][a[p[i]]] = abs(st - p[i]);
  ans = inf;
  for (int i = 1; i <= n; i++) {
    for (int j = a[p[i]]; j <= m; j++) {
      for (int k = 1; k < i && a[p[k]] < a[p[i]]; k++) {
        if (c[p[k]] != c[p[i]])
          dp[i][j] = min(dp[i][j], dp[k][j - a[p[i]]] + abs(p[i] - p[k]));
      }
      if (j >= lim) ans = min(ans, dp[i][j]);
    }
  }
  if (ans == inf) ans = -1;
  cout << ans;
  return 0;
}
