#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long sum = 0, ff = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') ff = -1;
    ch = getchar();
  }
  while (isdigit(ch)) sum = sum * 10 + (ch ^ 48), ch = getchar();
  return sum * ff;
}
const long long N = 5005;
long long A, B, n, lcs[N][N], f[N];
char ch[N];
signed main() {
  n = read();
  A = read();
  B = read();
  scanf("%s", ch + 1);
  for (long long i = 1; i <= n; i++)
    for (long long j = 1; j <= n; j++)
      if (ch[i] == ch[j])
        lcs[i][j] = lcs[i - 1][j - 1] + 1;
      else
        lcs[i][j] = 0;
  for (long long i = 1; i <= n; i++) {
    f[i] = f[i - 1] + A;
    for (long long j = 1; j < i; j++)
      if (lcs[i][j] <= i - j) f[i] = min(f[i], f[i - lcs[i][j]] + B);
  }
  printf("%lld\n", f[n]);
  return 0;
}
