#include <bits/stdc++.h>
using namespace std;
const int maxn = 5005;
const int mo = 1e9 + 7;
int N, a, b;
char S[maxn];
int pw[maxn], Hash[maxn], f[maxn];
int Hash_val(int x, int y) {
  if (x == 0) return Hash[y];
  return (Hash[y] - 1ll * Hash[x - 1] * pw[y - x + 1] % mo + mo) % mo;
}
bool judge(int s, int e) {
  int x = Hash_val(s, e);
  for (int i = 0; i + e - s < s; i++)
    if (Hash_val(i, i + e - s) == x) return 1;
  return 0;
}
int main() {
  scanf("%d%d%d", &N, &a, &b);
  scanf("%s", S);
  pw[0] = 1;
  for (int i = 1; i <= N; i++) pw[i] = pw[i - 1] * 29ll % mo;
  Hash[0] = S[0] - 'a';
  for (int i = 1; i < N; i++)
    Hash[i] = (Hash[i - 1] * 29ll % mo + S[i] - 'a') % mo;
  f[0] = a;
  int j = 0;
  for (int i = 1; i < N; i++) {
    f[i] = f[i - 1] + a;
    while (j <= i && !judge(j, i)) j++;
    if (j <= i) {
      for (int k = j - 1; k < i; k++) f[i] = min(f[i], f[k] + b);
    }
  }
  printf("%d\n", f[N - 1]);
  return 0;
}
