#include <bits/stdc++.h>
using namespace std;
int z[5005], dp[5005];
string s;
void Z(int p) {
  string t = s.substr(0, p + 1);
  reverse(t.begin(), t.end());
  int l = 0, r = 0, n = t.size(), i;
  for (i = 1; i < n; i++) {
    if (i > r) {
      l = r = i;
      while (r < n && t[r] == t[r - l]) r++;
      z[i] = r - l;
      r--;
    } else {
      int k = i - l;
      if (z[k] >= r - i + 1) {
        l = i;
        while (r < n && t[r] == t[r - l]) r++;
        z[i] = r - l;
        r--;
      } else {
        z[i] = z[k];
      }
    }
  }
}
int main() {
  int n, a, b, i, j;
  cin >> n >> a >> b;
  cin >> s;
  dp[0] = a;
  for (i = 1; i < s.size(); i++) {
    dp[i] = dp[i - 1] + a;
    Z(i);
    int mx = 0;
    for (j = 0; j < i; j++) {
      mx = max(mx, z[i - j]);
      if (mx >= (i - j)) dp[i] = min(dp[i], dp[j] + b);
    }
  }
  cout << dp[n - 1];
}
