#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 10;
const int inf = 0x3f3f3f3f;
int n, a, b;
int dp[maxn], p[maxn];
char str[maxn];
string s;
void getp() {
  for (int i = 1; i < s.length(); i++) {
    int j = p[i - 1];
    while (j > 0 && s[i] != s[j]) j = p[j - 1];
    if (s[i] == s[j]) j++;
    p[i] = j;
  }
}
int main() {
  cin >> n >> a >> b;
  for (int i = 1; i <= n; i++) {
    cin >> str[i];
    dp[i] = inf;
  }
  for (int i = 1; i <= n; i++) {
    s = "";
    for (int j = i; j <= n; j++) {
      s += str[j];
    }
    s += '&';
    for (int j = 1; j < i; j++) {
      s += str[j];
    }
    int mx = 0;
    getp();
    for (int j = n - i + 1; j < s.length(); j++) {
      mx = max(mx, p[j]);
    }
    dp[i] = min(dp[i], dp[i - 1] + a);
    for (int j = i; j <= i + mx - 1; j++) {
      dp[j] = min(dp[j], dp[i - 1] + b);
    }
  }
  cout << dp[n] << endl;
  return 0;
}
