#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 1e18;
template <typename T>
void read(T &x) {
  x = 0;
  int s = 1, c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') s = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - 48;
  x *= s;
}
template <typename T>
void write(T x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
void writeln(T x) {
  write(x);
  puts("");
}
const int maxn = 5e3 + 5;
int n, a, b;
char s[maxn];
int dp[maxn];
int z[maxn][maxn], arr[maxn];
void Z_algorithm(int pos, char *s, int n) {
  int l = 1, r = 1;
  for (int i = 2; i <= n; i++) {
    if (i > r) {
      l = i, r = i;
      while (r <= n && s[r - l + 1] == s[r]) r++;
      z[pos][i] = r - l;
      r--;
    } else {
      int k = i - l + 1;
      if (z[pos][k] < r - i + 1)
        z[pos][i] = z[pos][k];
      else {
        l = i;
        while (r <= n && s[r - l + 1] == s[r]) r++;
        z[pos][i] = r - l;
        r--;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> a >> b >> (s + 1);
  for (int i = 1; i <= n; i++) {
    Z_algorithm(i, s + i - 1, n - i + 1);
    for (int j = i + 1; j <= n; j++) {
      int tmp = min(j * 2 - i, j + z[i][j - i + 1]);
      tmp = min(tmp, n + 1);
      arr[j] = max(arr[j], tmp);
    }
  }
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1] + a;
    for (int j = 1; j <= i; j++)
      if (arr[j] > i) dp[i] = min(dp[i], dp[j - 1] + b);
  }
  cout << dp[n] << '\n';
  return 0;
}
