#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e3 + 5;
int dp[maxn][maxn];
int ans[maxn];
char s[maxn];
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  scanf("%s", s + 1);
  memset(dp, 0, sizeof(dp));
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < i; j++) {
      if (s[i] == s[j]) dp[i][j] = dp[i - 1][j - 1] + 1;
    }
    ans[i] = INT_MAX;
    for (int j = 0; j < i; j++) {
      int x = min(i - j, dp[i][j]);
      if (x > 0) ans[i] = min(ans[i], ans[i - x] + b);
    }
    ans[i] = min(ans[i], ans[i - 1] + a);
  }
  printf("%d\n", ans[n]);
}
