#include <bits/stdc++.h>
using namespace std;
const int N = 5e3 + 5, base = 37;
const long long mod = 1e9 + 7;
long long hsh[N], pw[N], dp[N];
int n, a, b;
bool seen[30];
string s;
long long f(long long x, long long y) {
  x = (x * base) % mod;
  x = (x + y) % mod;
  return (x + mod) % mod;
}
long long get(int l, int r) {
  long long tmp = (hsh[l] * pw[r - l]) % mod;
  tmp = (hsh[r] - tmp) % mod;
  return (tmp + mod) % mod;
}
void prep() {
  long long now = 0;
  pw[0] = 1;
  for (int i = 0; i < n; i++) {
    pw[i + 1] = (pw[i] * base) % mod;
    now = f(now, s[i] - 'a' + 1);
    hsh[i + 1] = now;
  }
}
bool ok(int len, int pos) {
  long long ret = get(pos - len + 1, pos + 1);
  for (int i = 0; i + len <= pos - len + 1; i++)
    if (ret == get(i, i + len)) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> a >> b >> s;
  prep();
  for (int i = 0; i < n; i++) {
    dp[i + 1] = dp[i] + a;
    if (!seen[s[i] - 'a']) {
      seen[s[i] - 'a'] = true;
      continue;
    }
    int low = 0, high = (i + 1) / 2 + 1;
    while (high - low > 1) {
      int mid = (low + high) >> 1;
      if (ok(mid, i))
        low = mid;
      else
        high = mid;
    }
    dp[i + 1] = min(dp[i + 1], dp[i - low + 1] + b);
  }
  cout << dp[n] << "\n";
}
