#include <bits/stdc++.h>
using namespace std;
int f[5010], lcs[5010][5010];
int n, a, b;
string s;
int main() {
  cin >> n >> a >> b >> s;
  s = "P" + s;
  for (int i = 1; i <= n; i++) {
    f[i] = f[i - 1] + a;
    for (int j = 1; j < i; j++) {
      lcs[i][j] = (s[i] == s[j]) ? lcs[i - 1][j - 1] + 1 : 0;
      f[i] = min(f[i], f[max(j, i - lcs[i][j])] + b);
    }
  }
  printf("%d", f[n]);
  return 0;
}
