#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7, pw = 211;
const int N = 5e3 + 13;
long long n, a, b;
long long h[N], p[N];
void get(string& s) {
  for (int i = 1; i <= n; i++) {
    h[i] = (h[i - 1] * pw + s[i - 1]) % M;
  }
  p[0] = 1;
  for (int i = 1; i <= n; i++) {
    p[i] = p[i - 1] * pw % M;
  }
}
long long sub(int l, int r) {
  return (h[r] - h[l - 1] * p[r - l + 1] % M + M) % M;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int _ = 1;
  while (_--) {
    cin >> n >> a >> b;
    string s;
    cin >> s;
    get(s);
    long long ans = 0;
    vector<int> c(n + 1);
    for (int i = 1; i <= n; i++) {
      int l = 0, r = n - i + 2;
      while (r - l > 1) {
        int m = (r + l) / 2;
        bool ok = false;
        for (int j = 1; j <= i - m; j++) {
          if (sub(i, i + m - 1) == sub(j, j + m - 1)) {
            ok = true;
            break;
          }
        }
        if (ok) {
          l = m;
        } else {
          r = m;
        }
      }
      if (l) {
        for (int j = i; j < i + l; j++) {
          c[j] = max(c[j], j - i + 1);
        }
      }
    }
    vector<long long> dp(n + 1);
    for (int i = 1; i <= n; i++) {
      if (!c[i]) {
        dp[i] = dp[i - 1] + a;
      } else {
        dp[i] = min(dp[i - c[i]] + b, dp[i - 1] + a);
      }
    }
    cout << dp[n] << endl;
  }
}
