#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long rand(long long l, long long r) {
  uniform_int_distribution<long long> uid(l, r);
  return uid(rng);
}
const int mod = 1e9 + 7;
const int mod1 = 998244353;
const int B = 37;
int pwr(int a, long long b) {
  int ans = 1;
  while (b) {
    if (b & 1) {
      ans = ((long long)ans * a) % mod;
    }
    a = ((long long)a * a) % mod;
    b >>= 1;
  }
  return ans;
}
const int N = 5005;
int dp[N], pre[N];
vector<int> z_function(string s) {
  int n = (int)s.length();
  vector<int> z(n, 0);
  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;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  dp[0] = 0;
  s = '0' + s;
  for (int i = 1; i <= n; i++) {
    auto z = z_function(s.substr(i, n - i + 1));
    for (int j = i; j <= n; j++) {
      pre[j] = max(pre[j], min(j - i, z[j - i]));
    }
  }
  for (int i = 1; i <= n; i++) {
    dp[i] = 1e9;
  }
  for (int i = 0; i <= n - 1; i++) {
    dp[i + 1] = min(dp[i + 1], dp[i] + a);
    dp[i + pre[i + 1]] = min(dp[i + pre[i + 1]], dp[i] + b);
  }
  cout << dp[n];
  return 0;
}
