#include <bits/stdc++.h>
using namespace std;
char s[5005];
int dp[5005];
int pi[5005];
void compute_pref(char *P, int m) {
  pi[1] = 0;
  int k = 0;
  for (int q = 2; q <= m; q++) {
    while (k > 0 && P[k + 1] != P[q]) k = pi[k];
    if (P[k + 1] == P[q]) k++;
    pi[q] = k;
  }
}
int kmp(char *T, int n, char *P, int m) {
  compute_pref(P, m);
  int q = 0;
  int res = 0;
  for (int i = 1; i <= n; i++) {
    while (q > 0 && P[q + 1] != T[i]) q = pi[q];
    if (P[q + 1] == T[i]) q++;
    res = max(res, q);
    if (q == m) break;
  }
  return res;
}
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  scanf("%s", s + 1);
  for (int i = 0; i < 5005; i++) {
    dp[i] = 0x3f3f3f3f;
  }
  dp[0] = 0;
  for (int i = 0; i < n; i++) {
    dp[i + 1] = min(dp[i + 1], dp[i] + a);
    int k = kmp(s, i, s + i, n - i);
    for (int j = 1; j <= k; j++) {
      dp[i + j] = min(dp[i + j], dp[i] + b);
    }
  }
  printf("%d\n", dp[n]);
  return 0;
}
