#include <bits/stdc++.h>
using namespace std;
const long long LLINF = 1e18;
const int INF = 1e9;
const int MOD = 20101009;
const int HMOD = 999959;
const int VMOD = 5000000;
const int MAXN = 5e3 + 10;
const int MAXM = 5e5 + 10;
const int INV = 10050505;
const long long LLINV = 1e18;
const double eps = 1e-3;
int dirx[5] = {0, -1, 1, 0, 0}, diry[5] = {0, 0, 0, -1, 1};
int n, a, b;
char s[MAXN];
int f[MAXN][MAXN];
int dp[MAXN], mx[MAXN];
;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  scanf("%d%d%d", &n, &a, &b);
  scanf("%s", s + 1);
  for (int i = n; i >= 1; --i) {
    for (int j = n; j >= 1; --j) {
      if (s[i] != s[j])
        f[i][j] = 0;
      else
        f[i][j] = f[i + 1][j + 1] + 1;
      mx[i] = max(mx[i], min(f[i][j], i - j));
    }
  }
  dp[1] = a;
  for (int i = 2; i <= n; ++i) {
    dp[i] = dp[i - 1] + a;
    for (int j = 2; j <= i; ++j) {
      if (mx[j] >= i - j + 1) dp[i] = min(dp[j - 1] + b, dp[i]);
    }
  }
  printf("%d\n", dp[n]);
  return 0;
}
