#include <bits/stdc++.h>
using namespace std;
const int N = 5050;
const int mod = 1e9 + 9;
int h[N], pw[N], dp[N];
char s[N];
int calc(int L, int R) {
  return ((h[R] - 1ll * pw[R - L + 1] * h[L - 1]) % mod + mod) % mod;
}
bool can(int i, int p) {
  if (p == 0) return true;
  int tmp = calc(i - p + 1, i);
  for (int j = 1; j + p - 1 <= i - p; j++)
    if (calc(j, j + p - 1) == tmp) return true;
  return false;
}
int main() {
  for (int i = pw[0] = 1; i < N; i++) pw[i] = 1ll * pw[i - 1] * 31 % mod;
  int n, a, b;
  cin >> n >> a >> b;
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) {
    h[i] = (1ll * h[i - 1] * 31 + s[i] - 'a' + 1) % mod;
  }
  for (int i = 1, pre = 0; i <= n; i++) {
    while (can(i, pre + 1)) pre++;
    while (!can(i, pre)) pre--;
    dp[i] = dp[i - 1] + a;
    for (int j = i - pre; j < i; j++) dp[i] = min(dp[i], dp[j] + b);
  }
  cout << dp[n] << endl;
  return 0;
}
