#include <bits/stdc++.h>
using namespace std;
const int N = 5e3 + 5;
int memo[N], n;
void getZarr(string str, int Z[]);
int search(string text, string pattern) {
  string concat = pattern + "$" + text;
  int l = concat.length();
  int Z[l];
  memset(Z, 0, sizeof Z);
  getZarr(concat, Z);
  int mx = 0;
  for (int i = pattern.size() + 1; i < l; ++i) {
    mx = max(Z[i], mx);
  }
  return mx;
}
void getZarr(string str, int Z[]) {
  int n = str.length();
  int L, R, k;
  L = R = 0;
  for (int i = 1; i < n; ++i) {
    if (i > R) {
      L = R = i;
      while (R < n && str[R - L] == str[R]) R++;
      Z[i] = R - L;
      R--;
    } else {
      k = i - L;
      if (Z[k] < R - i + 1)
        Z[i] = Z[k];
      else {
        L = i;
        while (R < n && str[R - L] == str[R]) R++;
        Z[i] = R - L;
        R--;
      }
    }
  }
}
string s;
int a, b;
int runZ(int i) {
  string text, pattern;
  for (int j = 0; j < i; ++j) {
    text += s[j];
  }
  while (i < n) {
    pattern += s[i++];
  }
  return search(text, pattern);
}
int dp(int i) {
  if (i == n) return 0;
  int &ret = memo[i];
  if (ret != -1) return ret;
  ret = dp(i + 1) + a;
  int val = runZ(i);
  if (val) ret = min(ret, dp(i + val) + b);
  return ret;
}
int main() {
  cin >> n >> a >> b >> s;
  memset(memo, -1, sizeof memo);
  cout << dp(0) << endl;
}
