#include <bits/stdc++.h>
long long int const MOD = 1000000007;
long long int const N = 1000005;
long long int const LN = 20;
long long int const inf = 8e18;
using namespace std;
long long int n, m;
long long int ok[N];
long long int dp[5005][5005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, a, b;
  cin >> n >> a >> b;
  string str;
  cin >> str;
  str = " " + str;
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = 1; j <= n; j++) {
      if (str[i] == str[j]) dp[i][j] = dp[i - 1][j - 1] + 1;
    }
  }
  for (long long int i = 1; i <= n; i++) {
    ok[i] = ok[i - 1] + a;
    long long int mxx = 0;
    for (long long 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;
}
