#include <bits/stdc++.h>
using namespace std;
int n;
int f[5005][5005];
int g[5005];
int a;
int b;
char s[5005];
int main() {
  scanf("%d", &n);
  scanf("%d %d", &a, &b);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      f[i][j] = (s[i] == s[j] ? f[i - 1][j - 1] + 1 : 0);
    }
  }
  for (int i = 1; i <= n; ++i) {
    g[i] = g[i - 1] + a;
    for (int j = 1; j < i; ++j) {
      g[i] = min(g[i], g[max(j, i - f[i][j])] + b);
    }
  }
  printf("%d\n", g[n]);
  return 0;
}
