#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void Min(T &a, T b) {
  a > b ? a = b : 0;
}
int n, A, B, t, cnt, dp[5005];
char s[5005];
struct SAM {
  int l, nxt, ch[26];
} a[5005 << 1];
inline void Ins(int c) {
  int u = ++cnt, p = t;
  a[u].l = a[t].l + 1;
  while (~p && !a[p].ch[c]) a[p].ch[c] = u, p = a[p].nxt;
  if (~p) {
    int q = a[p].ch[c];
    if (a[q].l == a[p].l + 1)
      a[u].nxt = q;
    else {
      int o = ++cnt;
      a[o].l = a[p].l + 1, a[o].nxt = a[q].nxt;
      for (register int i = 0; i < 26; ++i) a[o].ch[i] = a[q].ch[i];
      while (~p && a[p].ch[c] == q) a[p].ch[c] = o, p = a[p].nxt;
      a[q].nxt = a[u].nxt = o;
    }
  }
  t = u;
}
int main() {
  scanf("%d%d%d", &n, &A, &B), a[0].nxt = -1;
  scanf("%s", s + 1), dp[1] = A;
  for (register int i = 2; i <= n; ++i) dp[i] = 1000000000;
  for (register int i = 1; i <= n; ++i) {
    Ins(s[i] - 97), Min(dp[i + 1], dp[i] + A);
    int t = 0;
    for (register int j = i + 1; j <= n; ++j) {
      if (!a[t].ch[s[j] - 97]) break;
      t = a[t].ch[s[j] - 97], Min(dp[j], dp[i] + B);
    }
  }
  printf("%d", dp[n]);
  return 0;
}
