#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
long long dp[5001][5001];
long long ans[5001], len[5001];
void pi(string &s, vector<long long> &pi) {
  long long n = s.size();
  for (long long i = 1; i < n; i++) {
    long long j = pi[i - 1];
    while (j > 0 && s[i] != s[j]) j = pi[j - 1];
    if (s[i] == s[j]) j++;
    pi[i] = j;
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  long long n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j <= n; j++) dp[i][j] = INF;
  string t = "";
  for (long long i = 0; i < n; i++) {
    long long now = a;
    if (i > 0) now += ans[i - 1];
    dp[i][1] = now;
    for (long long j = 1; j <= len[i]; j++) {
      now = b;
      if (i - j >= 0) now += ans[i - j];
      dp[i][j] = min(dp[i][j], now);
    }
    string t = "";
    for (long long j = i; j >= 0; j--) t += s[j];
    t += '#';
    for (long long j = n - 1; j > i; j--) t += s[j];
    vector<long long> pf(n + 1);
    pi(t, pf);
    for (long long j = n; j > i + 1; j--) {
      long long delt = (j - pf[j] + 1) - (i + 2);
      len[n - 1 - delt] = max(len[n - 1 - delt], pf[j]);
    }
    now = INF;
    for (long long j = 0; j <= n; j++) now = min(now, dp[i][j]);
    ans[i] = now;
  }
  cout << ans[n - 1];
  return 0;
}
