#include <bits/stdc++.h>
using namespace std;
const int N = 5000 + 10, mod = 1e9 + 9, base = 97, M = 30;
int n, a, b, dp[N], Hash[N], pwHash[N];
bool mark[M];
string s;
int sum(int a, int b) {
  if (a + b >= mod) return a + b - mod;
  if (a + b < 0) return a + b + mod;
  return a + b;
}
int mul(int a, int b) { return ((1LL * a * b) % mod + mod) % mod; }
int get(int l, int r) { return sum(Hash[r], -mul(Hash[l], pwHash[r - l])); }
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> a >> b >> s;
  dp[1] = a;
  Hash[0] = 0;
  mark[s[0] - 'a'] = true;
  for (int i = 1; i <= n; i++)
    Hash[i] = sum(s[i - 1] - 'a' + 1, mul(Hash[i - 1], base));
  pwHash[0] = 1;
  for (int i = 1; i <= n; i++) pwHash[i] = mul(pwHash[i - 1], base);
  for (int i = 2; i <= n; i++) {
    dp[i] = dp[i - 1] + a;
    if (!mark[s[i - 1] - 'a']) {
      mark[s[i - 1] - 'a'] = true;
      continue;
    }
    int st = 1, en = i / 2 + 1, res = 0;
    while (st + 1 < en) {
      int mid = st + en >> 1;
      bool flag = false;
      for (int j = 0; j + mid <= i - mid; j++)
        flag |= get(j, j + mid) == get(i - mid, i);
      if (flag)
        st = mid;
      else
        en = mid;
    }
    dp[i] = min(dp[i], dp[i - st] + b);
    mark[s[i - 1] - 'a'] = true;
  }
  return cout << dp[n] << endl, 0;
}
