#include <bits/stdc++.h>
const int maxn = 5010;
int n, ca, cb, nxt[maxn], f[maxn];
bool g[maxn][maxn];
char s[maxn];
void chkmin(int &a, int b) { a = a < b ? a : b; }
void getnxt(char b[], int len) {
  nxt[1] = 0;
  for (int i = 2, j = 0; i <= len; ++i) {
    while (j && b[i] != b[j + 1]) j = nxt[j];
    if (b[i] == b[j + 1]) ++j;
    nxt[i] = j;
  }
}
bool chk(char a[], int n1, char b[], int n2) {
  if (n2 > n1) return false;
  getnxt(b, n2);
  for (int i = 1, j = 0; i <= n1; ++i) {
    while (j && a[i] != b[j + 1]) j = nxt[j];
    if (a[i] == b[j + 1]) ++j;
    if (j == n2) return true;
  }
  return false;
}
void prep() {
  int j = 1;
  for (int i = 1; i <= n; ++i) {
    j = std::max(i, j);
    while (j < n && chk(s, i - 1, s + i - 1, j - i + 2)) ++j;
    if (chk(s, i - 1, s + i - 1, j - i + 1)) g[i][j] = 1;
  }
  for (int i = 1; i <= n; ++i)
    for (int j = n; j >= i + 1; --j) g[i][j] |= g[i][j + 1];
}
int main() {
  scanf("%d%d%d\n", &n, &ca, &cb);
  scanf("%s", s + 1);
  prep();
  memset(f, 0x7f, sizeof(f));
  f[0] = 0;
  for (int i = 1; i <= n; ++i) {
    chkmin(f[i], f[i - 1] + ca);
    for (int j = 2; j <= i; ++j)
      if (g[j][i]) chkmin(f[i], f[j - 1] + cb);
  }
  printf("%d", f[n]);
}
