#include <bits/stdc++.h>
using namespace std;
struct state {
  short int len, link;
  map<char, int> next;
};
state st[12000];
short int vis[12000][5001];
int dp[5005];
int sz, last;
void sa_init() {
  sz = last = 0;
  st[0].len = 0;
  st[0].link = -1;
  ++sz;
}
char str[5005];
void sa_extend(char c) {
  int cur = sz++;
  st[cur].len = st[last].len + 1;
  int p;
  for (p = last; p != -1 && !st[p].next.count(c); p = st[p].link)
    st[p].next[c] = cur;
  if (p == -1)
    st[cur].link = 0;
  else {
    int q = st[p].next[c];
    if (st[p].len + 1 == st[q].len)
      st[cur].link = q;
    else {
      int clone = sz++;
      st[clone].len = st[p].len + 1;
      st[clone].next = st[q].next;
      st[clone].link = st[q].link;
      for (; p != -1 && st[p].next[c] == q; p = st[p].link)
        st[p].next[c] = clone;
      st[q].link = st[cur].link = clone;
    }
  }
  last = cur;
}
int big = 100000000;
int main() {
  int i, j, k, l, m, n, a, b;
  cin >> n >> a >> b;
  scanf("%s", &str);
  sa_init();
  for (int i = n - 1; i >= 0; i--) {
    sa_extend(str[i]);
  }
  for (int i = 0; str[i]; i++) {
    int cur = 0;
    dp[i] = big;
    for (int j = i, ln = 1; j >= 0; j--, ln++) {
      char c = str[j];
      cur = st[cur].next[c];
      int f = 0;
      if (j) f = dp[j - 1];
      if (ln == 1) {
        dp[i] = min(dp[i], f + a);
      }
      if (vis[cur][ln] == 0) {
        vis[cur][ln] = i + 1;
        continue;
      }
      int g = vis[cur][ln] - 1;
      if (g < j) dp[i] = min(dp[i], f + b);
    }
  }
  cout << dp[n - 1] << endl;
}
