#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T& t) {
  T f = 1;
  char ch = getchar();
  t = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -f;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') t = t * 10 + ch - '0', ch = getchar();
  t *= f;
}
template <typename T, typename... Args>
inline void read(T& t, Args&... args) {
  read(t);
  read(args...);
}
int n, a, b;
char c[5005];
int lps[5005][5005];
int f[5005];
int main() {
  read(n, a, b);
  scanf("%s", c + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (c[i] == c[j])
        lps[i][j] = lps[i - 1][j - 1] + 1;
      else
        lps[i][j] = 0;
  for (int i = 1; i <= n; i++) {
    f[i] = f[i - 1] + a;
    for (int j = 1; j < i; j++)
      if (lps[i][j]) f[i] = min(f[i], f[max(j, i - lps[i][j])] + b);
  }
  printf("%d", f[n]);
  return 0;
}
