#include <bits/stdc++.h>
using namespace std;
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
bool isSquare(T x) {
  T y = sqrt(x + 0.5);
  return (y * y) == x;
}
template <class T1, class T2>
T1 eqMin(T1 &x, const T2 &y) {
  if (T1(y) < x) return x = y;
  return x;
}
template <class T1, class T2>
T1 eqMax(T1 &x, const T2 &y) {
  if (T1(y) > x) return x = y;
  return x;
}
const double PI = acos(-1);
const double EPS = 1e-8;
const int INF = (int)2e9;
const unsigned long long LINF = (unsigned long long)2e18;
const long long MOD = (long long)1e9 + 7;
const int MAXN = (int)2e5 + 10;
int sup[5005][5005];
vector<int> z_function(string s) {
  int n = (int)s.length();
  vector<int> z(n);
  for (int i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
void solve() {
  int n, a, b;
  string s;
  cin >> n >> a >> b;
  cin >> s;
  vector<int> dp(n + 1);
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1] + a;
    for (int j = 0; j < i; j++) {
      if (s[i] == s[j]) {
        sup[i][j] = sup[i - 1][j - 1] + 1;
      }
      if (sup[i][j] != 0 && i - j >= sup[i][j]) {
        dp[i] = min(dp[i], dp[i - sup[i][j]] + b);
      }
    }
  }
  cout << dp[n] << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
