#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 1;
const int MOD = 1000696969;
const int MAXN = 5000;
int n, a, b;
char S[MAXN + 5];
int DP[MAXN + 5];
long long Hasz[MAXN + 5];
long long Pot[MAXN + 5];
void Read() {
  scanf("%d %d %d", &n, &a, &b);
  scanf("%s", &S);
}
bool IsSubstring(int x, int Len) {
  long long Haszyk = (Hasz[x + Len - 1] - Hasz[x - 1] + MOD) % MOD;
  for (int i = 1; i <= x - Len; i++) {
    long long New = (Hasz[i + Len - 1] - Hasz[i - 1] + MOD) % MOD;
    New = (New * Pot[x - i]) % MOD;
    if (Haszyk == New) return true;
  }
  return false;
}
void Solve() {
  for (int i = 1; i <= n; i++) DP[i] = INF;
  Pot[0] = 1;
  for (int i = 1; i <= n; i++) Pot[i] = (Pot[i - 1] * 31) % MOD;
  for (int i = 1; i <= n; i++)
    Hasz[i] = (Hasz[i - 1] + ((Pot[i] * (S[i - 1] - 'a' + 1)) % MOD)) % MOD;
  int Len = 0;
  for (int i = 1; i <= n; i++) {
    while (i - 1 > Len && n - i + 1 > Len) {
      Len++;
      if (!IsSubstring(i, Len)) {
        Len--;
        break;
      }
    }
    DP[i] = min(DP[i], DP[i - 1] + a);
    for (int j = 1; j <= Len; j++)
      DP[i + j - 1] = min(DP[i + j - 1], DP[i - 1] + b);
    Len = max(0, Len - 1);
  }
  printf("%d\n", DP[n]);
}
int main() {
  Read();
  Solve();
}
