#include <bits/stdc++.h>
using namespace std;
const int N = 5010;
const int mod = 1000000007;
char s[N];
int f[N][N], dp[N];
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  cin >> s + 1;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      if (s[i] == s[j]) f[i][j] = f[i - 1][j - 1] + 1;
  memset(dp, 0x3f, sizeof dp);
  dp[1] = a;
  for (int i = 2; i <= n; i++) {
    dp[i] = dp[i - 1] + a;
    for (int j = 1; j < i; j++) {
      int same = min(f[j][i], i / 2);
      int k = max(j, i - same);
      dp[i] = min(dp[i], dp[k] + b);
    }
  }
  printf("%d\n", dp[n]);
  return 0;
}
