#include <bits/stdc++.h>
using namespace std;
const int MAX = 5004;
int n, a, b, bkp[MAX], dp[MAX];
string s;
void preprocess(string P) {
  bkp[0] = -1;
  int i = 0, j = -1, m = P.length();
  while (i < m) {
    while (j >= 0 && P[i] != P[j]) j = bkp[j];
    i++;
    j++;
    bkp[i] = j;
  }
}
bool KMP(string T, string P) {
  preprocess(P);
  int i = 0, j = 0, n = T.length(), m = P.length();
  while (i < n) {
    while (j >= 0 && T[i] != P[j]) j = bkp[j];
    i++;
    j++;
    if (j == m) return true;
  }
  return false;
}
int main() {
  cin >> n >> a >> b >> s;
  for (int i = 0; i < n + 1; i++) dp[i] = 1e9;
  dp[0] = a;
  for (int i = 0; i < n; i++) {
    int l = i, r = n, ans = -1;
    while (r - l > 1) {
      int mid = (l + r) / 2;
      if (KMP(s.substr(0, i + 1), s.substr(i + 1, mid - i))) {
        l = mid;
        ans = mid;
      } else {
        r = mid;
      }
    }
    for (int j = i + 1; j < ans + 1; j++) dp[j] = min(dp[j], dp[i] + b);
    dp[i + 1] = min(dp[i + 1], dp[i] + a);
  }
  cout << dp[n - 1];
}
