#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
const int BLOCK = 333;
int dp[5010][5010], sum[5010], N, a, b, pd[5010];
string S;
int f(int i, int j) {
  if (j == N or i >= j) return 0;
  if (~dp[i][j]) return dp[i][j];
  if (S[i] == S[j]) return dp[i][j] = 1 + f(i + 1, j + 1);
  return dp[i][j] = 0;
}
int solve(int i) {
  if (i >= N) return (i == N) ? 0 : 2000000020LL;
  if (~pd[i]) return pd[i];
  pd[i] = a + solve(i + 1);
  for (int j = 1; j <= sum[i]; j++) pd[i] = min(pd[i], b + solve(i + j));
  return pd[i];
}
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  memset(dp, -1, sizeof dp);
  memset(pd, -1, sizeof pd);
  cin >> N >> a >> b;
  cin >> S;
  for (int i = 0; i < N; i++)
    for (int j = 0; j < i; j++) sum[i] = max(sum[i], min(i - j, f(j, i)));
  cout << solve(0) << '\n';
  return 0;
}
