#include <bits/stdc++.h>
using namespace std;
int c[5010], x[5010], y[5010], sa[5010], r[5010], h[5010];
char s[5010];
void build(int n, int m) {
  int i, j, k;
  for (i = 0; i < m; i++) c[i] = 0;
  for (i = 0; i < n; i++) {
    x[i] = s[i] - 'a' + 1;
    c[x[i]]++;
  }
  for (i = 1; i < m; i++) c[i] += c[i - 1];
  for (i = n - 1; i >= 0; i--) sa[--c[x[i]]] = i;
  for (j = 1; j < n; j *= 2) {
    k = 0;
    for (i = n - j; i < n; i++) y[k++] = i;
    for (i = 0; i < n; i++)
      if (sa[i] >= j) y[k++] = sa[i] - j;
    for (i = 0; i < m; i++) c[i] = 0;
    for (i = 0; i < n; i++) c[x[y[i]]]++;
    for (i = 1; i < m; i++) c[i] += c[i - 1];
    for (i = n - 1; i >= 0; i--) sa[--c[x[y[i]]]] = y[i];
    swap(x, y);
    m = 0;
    x[sa[0]] = m++;
    for (i = 1; i < n; i++) {
      if (y[sa[i]] == y[sa[i - 1]] && y[sa[i] + j] == y[sa[i - 1] + j])
        x[sa[i]] = m - 1;
      else
        x[sa[i]] = m++;
    }
    if (m >= n) break;
  }
  k = 0;
  for (i = 0; i < n; i++) r[sa[i]] = i;
  for (i = 0; i < n - 1; i++) {
    j = sa[r[i] - 1];
    if (k) k--;
    while (s[i + k] == s[j + k]) k++;
    h[r[i]] = k;
  }
}
int A[5010][5010], dp[5010];
int main() {
  int i, j, n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  scanf("%s", &s);
  s[n++] = 'a' - 1;
  build(n, 30);
  for (i = 1; i < n - 1; i++) {
    int ma = 0, len, k = h[r[i]];
    for (j = r[i]; j >= 1; j--) {
      if (k > h[j]) k = h[j];
      if (sa[j - 1] < i) {
        len = i - sa[j - 1];
        if (len > k) len = k;
        if (ma < len) ma = len;
      }
    }
    k = h[r[i] + 1];
    for (j = r[i] + 1; j <= n - 1; j++) {
      if (k > h[j]) k = h[j];
      if (sa[j] < i) {
        len = i - sa[j];
        if (len > k) len = k;
        if (ma < len) ma = len;
      }
    }
    for (j = i; j <= i + ma - 1; j++) A[i - 1][j] = 1;
  }
  dp[0] = a;
  for (i = 1; i < n - 1; i++) {
    dp[i] = dp[i - 1] + a;
    for (j = 0; j < i; j++) {
      if (A[j][i] && dp[j] + b < dp[i]) dp[i] = dp[j] + b;
    }
  }
  cout << dp[n - 2] << endl;
  return 0;
}
