#include <bits/stdc++.h>
using namespace std;
const int N = 5010;
int n, a, b;
char s[N];
int dp[N];
short lcp[N][N];
int main() {
  scanf("%d%d%d%s", &n, &a, &b, s + 1);
  for (int i = n; i; --i)
    for (int j = n; j; --j)
      lcp[i][j] = (s[i] == s[j]) ? (lcp[i + 1][j + 1] + 1) : 0;
  for (int i = n; i; --i) {
    int len = 0;
    for (int j = 1; j < i; ++j) len = max(len, min((int)lcp[i][j], i - j));
    if (len == 0)
      dp[i] = dp[i + 1] + a;
    else
      dp[i] = min(dp[i + 1] + a, dp[i + len] + b);
  }
  printf("%d\n", dp[1]);
  return 0;
}
