#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e9 + 9;
const int inf = (int)1e9;
vector<int> z_function(string &s) {
  int n = (int)s.size();
  vector<int> z(n, 0);
  for (int i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) {
      z[i] = min(r - i + 1, z[i - l]);
    }
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) {
      ++z[i];
    }
    if (i + z[i] - 1 > r) {
      l = i;
      r = i + z[i] - 1;
    }
  }
  return z;
}
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  string s;
  for (int i = 0; i < n; ++i) {
    char c;
    scanf(" %c", &c);
    s += c;
  }
  vector<unordered_set<int> > step(n, unordered_set<int>());
  for (int i = 0; i < n; ++i) {
    string _s = "";
    for (int j = i; j < n; ++j) {
      _s += s[j];
    }
    vector<int> z = z_function(_s);
    for (int j = 0; j < (int)_s.size(); ++j) {
      z[j] = min(z[j], j);
      if (z[j] > 0) {
        step[i + j + z[j] - 1].insert(i + j - 1);
      }
    }
  }
  vector<int> d(n + 1, inf);
  d[n] = 0;
  for (int i = n; i > 0; --i) {
    d[i - 1] = min(d[i - 1], d[i] + a);
    for (auto &to : step[i - 1]) {
      d[to + 1] = min(d[to + 1], d[i] + b);
    }
  }
  printf("%d", d[0]);
  return 0;
}
