#include <bits/stdc++.h>
using namespace std;
const long long MAX = 5e3 + 20;
long long inf = (long long)1e14;
long long mod1 = (long long)1e9 + 9, p = 151, mod2 = (long long)1e9 + 7;
long long n, a, b, ln[MAX][MAX], dp[MAX];
string s;
void solve() {
  cin >> n >> a >> b;
  cin >> s;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j < i; j++) {
      if (s[i - 1] == s[j - 1]) {
        ln[i][j] = min(ln[i - 1][j - 1] + 1, i - j);
      }
    }
  }
  for (int i = 1; i <= s.size(); i++) {
    dp[i] = dp[i - 1] + a;
    long long len = 0;
    for (int j = 1; j < i; j++) {
      len = max(len, ln[i][j]);
    }
    for (int j = i - len + 1; j <= i; j++) {
      dp[i] = min(dp[i], dp[j - 1] + b);
    }
  }
  cout << dp[n];
}
int main() {
  mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
  ios::sync_with_stdio(0);
  long long q;
  q = 1;
  while (q--) solve();
  return 0;
}
