#include <bits/stdc++.h>
using namespace std;
int dp[5009];
int match[5009][5009];
int n, a, b;
int len;
string str;
int main() {
  int i, j;
  scanf("%d %d %d", &n, &a, &b);
  cin >> str;
  memset(dp, 0, sizeof(dp));
  memset(match, 0, sizeof(match));
  for (i = 1; i <= n; i++) {
    for (j = i; j <= n; j++) {
      if (str.at(i - 1) == str.at(j - 1)) {
        match[i][j] = match[i - 1][j - 1] + 1;
      }
    }
  }
  for (i = 1; i <= n; i++) {
    dp[i] = dp[i - 1] + a;
    for (j = 1; j < i; j++) {
      len = min(i - j, match[j][i]);
      if (len != 0) {
        dp[i] = min(dp[i], dp[i - len] + b);
      }
    }
  }
  printf("%d\n", dp[n]);
  return 0;
}
