#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000 + 5;
int dp[maxn];
int lcs[maxn][maxn];
char s[maxn];
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1] + a;
    for (int j = 1; j <= i - 1; j++) {
      if (s[i] == s[j]) lcs[i][j] = lcs[i - 1][j - 1] + 1;
      if (lcs[i][j] != 0 && i - j >= lcs[i][j])
        dp[i] = min(dp[i], dp[i - lcs[i][j]] + b);
    }
  }
  cout << dp[n] << endl;
  return 0;
}
