#include <bits/stdc++.h>
using namespace std;
vector<int> z_function(const string& s, int beg) {
  int n = (int)s.length();
  vector<int> z(n);
  for (int i = 1, l = 0, r = 0; i < n - beg; ++i) {
    if (i <= r) z[i + beg] = min(r - i + 1, z[i - l + beg]);
    while (i + z[i + beg] < n - beg &&
           s[z[i + beg] + beg] == s[i + z[i + beg] + beg])
      ++z[i + beg];
    if (i + z[i + beg] - 1 > r) l = i, r = i + z[i + beg] - 1;
  }
  return z;
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  int n, a, b;
  string s;
  cin >> n >> a >> b >> s;
  vector<vector<int> > z(n);
  for (int i = 0; i < n; ++i) {
    z[i] = z_function(s, i);
  }
  vector<long long> d(n, 1e18);
  d[0] = a;
  for (int i = 1; i < n; ++i) {
    d[i] = min(d[i], d[i - 1] + a);
    int ma = 0;
    for (int j = 0; j < i; ++j) {
      ma = max(ma, min(z[j][i], i - j));
    }
    for (int l = 1; l <= ma; ++l) {
      d[i + l - 1] = min(d[i + l - 1], d[i - 1] + b);
    }
  }
  cout << d.back() << endl;
  return 0;
}
