#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize(4)
using namespace std;
const int N = 5e3 + 5;
const int B1 = 37, B2 = 73;
unsigned long long h1[N], p1[N], h2[N], p2[N];
char s[N];
int n, a, b, dp[N];
inline unsigned long long get_h1(int l, int r) {
  return h1[r] - h1[l - 1] * p1[r - l + 1];
}
inline unsigned long long get_h2(int l, int r) {
  return h2[r] - h2[l - 1] * p2[r - l + 1];
}
inline bool ck(int x, int y, int m) {
  return get_h1(x, x + m - 1) == get_h1(y, y + m - 1) &&
         get_h2(x, x + m - 1) == get_h2(y, y + m - 1);
}
int main() {
  scanf("%d %d %d", &n, &a, &b);
  scanf("%s", s + 1);
  p1[0] = p2[0] = 1;
  for (int i = 1; i <= n; ++i)
    h1[i] = h1[i - 1] * B1 + s[i] - '0' + 1, p1[i] = p1[i - 1] * B1,
    h2[i] = h2[i - 1] * B2 + s[i] - '0' + 1, p2[i] = p2[i - 1] * B2;
  memset(dp, 0x3f, sizeof(dp));
  dp[1] = a;
  for (int i = 2; i <= n; ++i) {
    int mx = 0;
    for (int j = 1; j < i; ++j) {
      int l = 0, r = min(i - j, n - i + 1), m = l + r + 1 >> 1;
      while (l < r) {
        if (ck(i, j, m))
          l = m;
        else
          r = m - 1;
        m = l + r + 1 >> 1;
      }
      mx = max(mx, m);
    }
    if (mx) {
      dp[i + mx - 1] = min(dp[i + mx - 1], dp[i - 1] + b);
    }
    dp[i] = min(dp[i - 1] + a, dp[i]);
  }
  printf("%d\n", dp[n]);
  return 0;
}
