#include <bits/stdc++.h>
using namespace std;
const double pi = 2 * acos(0.0);
const int maxn = 5e3 + 10;
const int inf = 2e9;
const int maxm = 1e4 + 10;
const int mod = 998244353;
long long dp[maxn];
int v[maxn][maxn];
char s[maxn];
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (s[i] == s[j]) v[i][j] = v[i - 1][j - 1] + 1;
    }
  }
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1] + a;
    for (int j = i - 1; j >= 1; j--) {
      int t = min(i - j, v[j][i]);
      if (t) dp[i] = min(dp[i], dp[i - t] + b);
    }
  }
  printf("%lld\n", dp[n]);
  return 0;
}
