#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
int n, m;
int ok[N];
int dp[5005][5005];
int main() {
  ios::sync_with_stdio(false);
  int n, a, b;
  cin >> n >> a >> b;
  string str;
  cin >> str;
  str = " " + str;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (str[i] == str[j]) dp[i][j] = dp[i - 1][j - 1] + 1;
    }
  }
  for (int i = 1; i <= n; i++) {
    ok[i] = ok[i - 1] + a;
    int mxx = 0;
    for (int j = 1; j < i; j++) {
      mxx = max(mxx, dp[i][j]);
      if (mxx >= (i - j)) ok[i] = min(ok[i], ok[j] + b);
    }
  }
  cout << ok[n];
  return 0;
}
