#include <bits/stdc++.h>
using namespace std;
const int N = 5e3 + 10;
int n, a, b;
string s;
int d[N], z[N], t[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> a >> b >> s;
  for (int i = 0; i < n; i++) {
    memset(z, 0, sizeof z);
    for (int j = 1, l = 0, r = 0; j + i < n; j++) {
      if (j <= r) z[j] = min(r - j + 1, z[j - l]);
      while (i + j + z[j] < n && s[i + z[j]] == s[i + j + z[j]]) z[j]++;
      if (j + z[j] - 1 > r) {
        r = j + z[j] - 1;
        l = j;
      }
      t[i + j] = max(t[i + j], min(j, z[j]));
    }
  }
  for (int i = 0; i < n; i++) d[i] = 1e9;
  for (int i = 0; i < n; i++) {
    if (i == 0)
      d[i] = a;
    else
      d[i] = min(d[i], d[i - 1] + a);
    for (int len = 1; len <= t[i]; len++) {
      int j = i + len - 1;
      d[j] = min(d[j], d[i - 1] + b);
    }
  }
  cout << d[n - 1];
  return 0;
}
