#include <bits/stdc++.h>
const int MAXINT = 2147483640;
const long long MAXLL = 9223372036854775800LL;
const long long MAXN = 1000000;
const double pi = 3.1415926535897932384626433832795;
using namespace std;
long long step[200000];
long long step2[200000];
long long hs1[200000];
long long hs2[200000];
long long mod = 1123456793;
long long mod2 = 1e9 + 9;
long long p = 32;
char x1[300000];
long long get(long long l, long long r, long long L, long long R) {
  long long x = (hs1[r] - hs1[l - 1] + mod) % mod;
  long long y = (hs1[R] - hs1[L - 1] + mod) % mod;
  long long x2 = (hs2[r] - hs2[l - 1] + mod2) % mod2;
  long long y2 = (hs2[R] - hs2[L - 1] + mod2) % mod2;
  if (l < L) {
    if (x * step[L - l] % mod == y && x2 * step2[L - l] % mod2 == y2)
      return 1;
    else
      return 0;
  } else {
    if (y * step[l - L] % mod == x && y2 * step2[l - L] % mod2 == x2)
      return 1;
    else
      return 0;
  }
}
int check(int l1, int r1, int now) {
  int sz = r1 - l1 + 1;
  for (int i = 1; i + sz - 1 <= now; i++) {
    if (get(i, i + sz - 1, l1, r1)) return 1;
  }
  return 0;
}
long long dp[5010];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  srand(time(0));
  long long n, a, b;
  cin >> n >> a >> b;
  for (int i = 1; i <= n; i++) cin >> x1[i];
  step[0] = 1;
  for (int i = 1; i <= n; i++) step[i] = (step[i - 1] * p) % mod;
  step2[0] = 1;
  for (int i = 1; i <= n; i++) step2[i] = (step2[i - 1] * p) % mod2;
  for (int i = 1; i <= n; i++) {
    hs1[i] = hs1[i - 1] + (x1[i] - 'a' + 3) * step[i];
    hs1[i] %= mod;
    hs2[i] = hs2[i - 1] + (x1[i] - 'a' + 3) * step2[i];
    hs2[i] %= mod2;
  }
  long long ans = a;
  long long now = 1;
  for (int i = 1; i <= n; i++) {
    dp[i] = 1e18;
  }
  long long r = 1;
  for (long long i = 1; i <= n; i++) {
    r = max(r, i);
    dp[i] = min(dp[i], dp[i - 1] + a);
    while (r <= n and check(i, r, i - 1) == 1) {
      dp[r] = min(dp[r], dp[r - 1] + a);
      dp[r] = min(dp[i - 1] + b, dp[r]);
      r++;
    }
  }
  cout << dp[n] << endl;
  return 0;
}
