#include <bits/stdc++.h>
using namespace std;
ifstream in;
ofstream out;
const int N = 5000 + 6;
const int INF = INT_MAX / 1000;
int z[N];
int dp[N];
int n, a, b;
void z_function(string s, int *z) {
  int n = s.size();
  int l = 0, r = -1;
  z[0] = 0;
  for (int i = 1; i < n; ++i) {
    z[i] = 0;
    if (i < r) {
      z[i] = min(r - i, z[i - l]);
    }
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) {
      ++z[i];
    }
    if (i + z[i] > r) {
      l = i;
      r = i + z[i];
    }
  }
}
int max_el(int *z, int n) {
  int res = 0;
  for (int i = 0; i < n; ++i) z[i] = min(z[i], i), res = max(res, z[i]);
  return res;
}
int main() {
  string s, rs;
  cin >> n >> a >> b >> s;
  rs = s;
  reverse(rs.begin(), rs.end());
  dp[0] = 0;
  for (int i = 1; i <= n; ++i) dp[i] = i * a;
  for (int i = 1; i <= n; ++i) {
    dp[i] = min(dp[i], dp[i - 1] + a);
    if (i != 1) dp[i] = min(dp[i], (s[i - 1] == s[0] ? dp[i - 1] + b : dp[i]));
    z_function(rs.substr(n - i), z);
    int mx = max_el(z, i);
    if (mx)
      for (int j = 1; j <= mx; ++j) dp[i] = min(dp[i], dp[i - j] + b);
  }
  cout << dp[n] << '\n';
  return 0;
}
