#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void chkmin(T &x, T y) {
  if (y < x) x = y;
}
template <typename T>
inline void chkmax(T &x, T y) {
  if (y > x) x = y;
}
template <typename T>
inline T add(T x, T y) {
  return (x + y) % 1000000007;
}
template <typename T>
inline T mul(T x, T y) {
  return 1LL * x * y % 1000000007;
}
template <typename T>
inline T qp(T x, T n) {
  T ans = 1;
  do {
    if (n & 1) ans = mul(ans, x);
    x = mul(x, x);
  } while (n >>= 1);
  return ans;
}
const int SZ = 1 << 13;
char buff[SZ], *pos = buff + SZ - 1;
inline long long read() {
  long long x = 0;
  int f = 1,
      c = (++pos == buff + SZ ? fread(pos = buff, 1, SZ, stdin), *pos : *pos);
  for (; !isdigit(c);
       c = (++pos == buff + SZ ? fread(pos = buff, 1, SZ, stdin), *pos : *pos))
    if (c == '-') f = -f;
  for (; isdigit(c);
       c = (++pos == buff + SZ ? fread(pos = buff, 1, SZ, stdin), *pos : *pos))
    x = (x << 3) + (x << 1) + (c ^ 48);
  return x * f;
}
const int N = 5005;
int n, a, b;
char s[N];
int lcp[N][N];
int z[N];
int dp[N];
char ss[N];
void calcZ(int m) {
  int l = 0, r = 0;
  memset(z, 0, sizeof z);
  for (int i = 1; i < m; ++i) {
    if (i <= r) z[i] = min(z[i - l], r - i + 1);
    for (; i + z[i] < m && ss[i + z[i]] == ss[z[i]]; ++z[i])
      ;
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
}
int main() {
  n = read(), a = read(), b = read();
  for (int i = 0; i < (int)(n); ++i)
    s[i] = (++pos == buff + SZ ? fread(pos = buff, 1, SZ, stdin), *pos : *pos);
  for (int i = 0; i < (int)(n); ++i) {
    int m = 0;
    for (int j = i; j < n; ++j) ss[m++] = s[j];
    calcZ(m);
    for (int j = 0; j < (int)(m); ++j)
      if (j) lcp[i + j][i] = z[j];
  }
  memset(dp, 0x3f, sizeof dp);
  dp[0] = 0;
  for (int i = 0; i < (int)(n); ++i) {
    chkmin(dp[i + 1], dp[i] + a);
    int mx = 0;
    for (int j = 0; j < (int)(i); ++j) chkmax(mx, min(lcp[i][j], i - j));
    for (int j = i + 1; j - i <= mx; ++j) chkmin(dp[j], dp[i] + b);
  }
  printf("%d\n", dp[n]);
  return 0;
}
