#include <bits/stdc++.h>
using namespace std;
const int N = 5010, INF = 1e9;
char a[N];
struct Suffix_Automaton {
  int ch[26], len, link;
} SAM[N << 1];
struct Segment_Tree {
  int sum, lc, rc;
} Tree[N * 40];
int n, A, B, tot, las, Node, rt[N << 1], cnt[N], tmp[N << 1], dp[N], q[N];
void insert(int &o, int l, int r, int x) {
  o = ++Node;
  Tree[o].sum++;
  if (l == r) return;
  int mid = (l + r) >> 1;
  if (x <= mid)
    insert(Tree[o].lc, l, mid, x);
  else
    insert(Tree[o].rc, mid + 1, r, x);
}
inline void extend(int x) {
  int k = a[x] - 'a', np = ++tot;
  SAM[np].len = x;
  insert(rt[np], 1, n, x);
  int p = las;
  while (p && (!SAM[p].ch[k])) SAM[p].ch[k] = np, p = SAM[p].link;
  if (!p) {
    SAM[np].link = 1;
    las = np;
    return;
  }
  int q = SAM[p].ch[k];
  if (SAM[p].len + 1 == SAM[q].len) {
    SAM[np].link = q;
    las = np;
    return;
  }
  int nq = ++tot;
  SAM[nq].len = SAM[p].len + 1;
  SAM[nq].link = SAM[q].link;
  SAM[np].link = SAM[q].link = nq;
  while (p && SAM[p].ch[k] == q) SAM[p].ch[k] = nq, p = SAM[p].link;
  for (register int i = 0; i < 26; ++i) SAM[nq].ch[i] = SAM[q].ch[i];
  las = np;
}
inline void build() {
  SAM[1].len = 0;
  SAM[1].link = 0;
  tot = 1;
  las = 1;
  for (register int i = 1; i <= n; ++i) extend(i);
}
int Merge(int x, int y) {
  if ((!x) || (!y)) return x ^ y;
  int o = ++Node;
  Tree[o].sum = Tree[x].sum + Tree[y].sum;
  Tree[o].lc = Merge(Tree[x].lc, Tree[y].lc);
  Tree[o].rc = Merge(Tree[x].rc, Tree[y].rc);
  return o;
}
inline void preprocess() {
  for (register int i = 1; i <= tot; ++i) cnt[SAM[i].len]++;
  for (register int i = 1; i <= n; ++i) cnt[i] += cnt[i - 1];
  for (register int i = tot; i >= 1; --i) tmp[cnt[SAM[i].len]--] = i;
  for (register int i = tot; i >= 2; --i) {
    int t = tmp[i];
    rt[SAM[t].link] = Merge(rt[SAM[t].link], rt[t]);
  }
}
int query(int o, int l, int r, int x) {
  if (!o) return 0;
  if (l == r) return Tree[o].sum;
  int mid = (l + r) >> 1;
  if (x <= mid)
    return query(Tree[o].lc, l, mid, x);
  else {
    if (Tree[Tree[o].lc].sum)
      return 1;
    else
      return query(Tree[o].rc, mid + 1, r, x);
  }
}
inline void DP() {
  for (register int i = 1; i <= n; ++i) dp[i] = INF;
  dp[0] = 0;
  int now = 1, j = 0, head = 1, tail = 0;
  for (register int i = 1; i <= n; ++i) {
    int k = a[i] - 'a';
    now = SAM[now].ch[k];
    while (j < i && (j < 1 || (!query(rt[now], 1, n, j)))) {
      j++;
      if (i - j < SAM[SAM[now].link].len + 1) now = SAM[now].link;
    }
    while (head <= tail && q[head] < j) head++;
    if (head <= tail) dp[i] = min(dp[i], dp[q[head]] + B);
    dp[i] = min(dp[i], dp[i - 1] + A);
    while (head <= tail && dp[i] <= dp[q[tail]]) tail--;
    q[++tail] = i;
  }
  printf("%d\n", dp[n]);
}
int main() {
  scanf("%d%d%d%s", &n, &A, &B, a + 1);
  build();
  preprocess();
  DP();
  return 0;
}
