#include <bits/stdc++.h>
using namespace std;
const int MN = 5005, LOG = 15, inf = 1000000005, mod = 1000000007;
const long long INF = 1000000000000000005LL;
int dp[MN];
bitset<MN> fajny[MN];
pair<short int, short int> pie[MN][MN];
int kmr[LOG][2 * MN];
char S[MN];
int n;
void licz(int poz) {
  vector<pair<short int, short int> > P;
  for (int i = 1; i <= n; ++i)
    P.push_back({kmr[poz - 1][i], kmr[poz - 1][i + (1 << (poz - 1))]});
  sort((P).begin(), (P).end());
  for (int i = 1; i <= n; ++i) {
    pair<short int, short int> cur = {kmr[poz - 1][i],
                                      kmr[poz - 1][i + (1 << (poz - 1))]};
    kmr[poz][i] = (int)(lower_bound((P).begin(), (P).end(), cur) - P.begin());
  }
}
pair<short int, short int> hasz(int i, int j) {
  int len = j - i + 1;
  int wyk = 31 - __builtin_clz(len);
  int pot = (1 << wyk);
  return {kmr[wyk][i], kmr[wyk][j - pot + 1]};
}
int main() {
  int a, b;
  scanf("%d%d%d", &n, &a, &b);
  scanf("%s", S);
  for (int i = 1; i <= n; ++i) kmr[0][i] = S[i - 1] - 'a';
  for (int i = 1; i < LOG; ++i) licz(i);
  for (int l = 1; l <= n; ++l)
    for (int i = 1; i + l - 1 <= n; ++i) {
      pair<short int, short int> h = hasz(i, i + l - 1);
      if (pie[h.first][h.second].first == l) {
        if (pie[h.first][h.second].second + l - 1 < i) fajny[i][i + l - 1] = 1;
      } else {
        pie[h.first][h.second] = {l, i};
      }
    }
  for (int i = 1; i <= n; ++i) {
    dp[i] = dp[i - 1] + a;
    for (int j = i; j > 0; --j)
      if (fajny[j][i]) dp[i] = min(dp[i], dp[j - 1] + b);
  }
  printf("%d", dp[n]);
}
