#include <bits/stdc++.h>
using namespace std;
std::mt19937 rng(
    (int)std::chrono::steady_clock::now().time_since_epoch().count());
const int MOD = 1000000007;
const int MAXN = 5010;
int ult[MAXN];
int dp[MAXN];
string s;
int n, a, b;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> a >> b;
  cin >> s;
  string aux;
  for (int i = 0; i < n; i++) {
    int ans = -1, l = i, r = n - 1;
    while (l <= r) {
      int m = (l + r) >> 1;
      int p = aux.find(s.substr(i, m - i + 1));
      if ((p >= 0) and (p < int(aux.size()))) {
        ans = m;
        l = m + 1;
      } else {
        r = m - 1;
      }
    }
    aux += s[i];
    ult[i] = ans;
  }
  dp[n] = 0;
  for (int i = n - 1; i >= 0; i--) {
    dp[i] = dp[i + 1] + a;
    for (int j = i; j <= ult[i]; j++) dp[i] = min(dp[i], dp[j + 1] + b);
  }
  cout << dp[0] << '\n';
  return 0;
}
