#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
const int N = 5002;
int n, A, B, mx[N], dp[N];
string s;
vector<int> buildZ(const string& t) {
  vector<int> z(((int)(t).size()), 0);
  int L = 0, R = 0;
  for (int i = (1); i <= (((int)(t).size()) - 1); ++i) {
    if (R < i) {
      R = L = i;
      while (R < ((int)(t).size()) && t[R] == t[R - L]) R++;
      z[i] = R - L, R--;
    } else {
      int k = i - L;
      if (z[k] < R - i)
        z[i] = z[k];
      else {
        L = i;
        while (R < ((int)(t).size()) && t[R] == t[R - L]) R++;
        z[i] = R - L, R--;
      }
    }
  }
  return z;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> A >> B >> s;
  reverse((s).begin(), (s).end());
  for (int i = (0); i <= (((int)(s).size()) - 2); ++i) {
    string tmp = s.substr(i);
    vector<int> z = buildZ(tmp);
    for (int j = (1); j <= (((int)(tmp).size()) - 1); ++j)
      mx[i] = max(mx[i], min(z[j], j));
  }
  for (int i = (((int)(s).size()) - 1); i >= (0); --i) {
    dp[i] = dp[i + 1] + A;
    for (int j = (1); j <= (mx[i]); ++j) dp[i] = min(dp[i], dp[i + j] + B);
  }
  cout << dp[0];
  return 0;
}
