#include <bits/stdc++.h>
using namespace std;
string s;
int A[5010][5010] = {}, c[5010], n;
long long dp[5010], a, b;
bool f[5010][5010];
void zalgo(int x) {
  string t;
  for (int i = x; i < n; i++) {
    t.push_back(s[i]);
  }
  A[x][0] = t.size();
  int i = 1, j = 0;
  while (i < t.size()) {
    while (i + j < t.size() && t[j] == t[i + j]) ++j;
    A[x][i] = j;
    if (j == 0) {
      ++i;
      continue;
    }
    int k = 1;
    while (i + k < t.size() && k + A[x][k] < j) A[x][i + k] = A[x][k], ++k;
    i += k;
    j -= k;
  }
}
int main() {
  cin >> n >> a >> b >> s;
  int i, j;
  for (i = 0; i < n; i++) {
    zalgo(i);
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n - i; j++) {
      c[i + j] = max(c[i + j], min(A[i][j], j));
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n - i; j++) {
      if (j < c[i])
        f[i][i + j] = true;
      else
        f[i][i + j] = false;
    }
  }
  for (i = 0; i <= n; i++) dp[i] = 10000000000000;
  dp[0] = 0;
  for (i = 1; i <= n; i++) {
    dp[i] = min(dp[i], dp[i - 1] + a);
    for (j = 0; j < i; j++) {
      if (f[j][i - 1]) dp[i] = min(dp[i], dp[j] + b);
    }
  }
  cout << dp[n] << endl;
}
