#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, F = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') F = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * F;
}
int n, a, b;
char s[5000 + 5];
int lcp[5000 + 5][5000 + 5], dp[5000 + 5];
int main() {
  n = read(), a = read(), b = read();
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (s[i] == s[j]) lcp[i][j] = lcp[i - 1][j - 1] + 1;
  memset(dp, 0x3f, sizeof(dp));
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1] + a;
    for (int j = 1; j < i; j++)
      dp[i] = min(dp[i], dp[max(i - lcp[i][j], j)] + b);
  }
  printf("%d", dp[n]);
}
