#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long binpow(long long a, long long b) {
  if (b == 0) return 1;
  long long res = binpow(a, b / 2);
  if (b % 2)
    return (((long long)res * (long long)res) * (long long)a);
  else
    return ((long long)res * (long long)res);
}
vector<int> prefix_function(string s) {
  int n = (int)s.length();
  vector<int> pi(n);
  for (int i = 1; i < n; i++) {
    int j = pi[i - 1];
    while (j > 0 && s[i] != s[j]) j = pi[j - 1];
    if (s[i] == s[j]) j++;
    pi[i] = j;
  }
  return pi;
}
vector<int> zalgo(string s) {
  int n = s.length();
  vector<int> z(n, 0);
  for (int i = 1, l = 0, r = 0; i < n; i++) {
    if (i <= r) {
      z[i] = min(z[i - l], r - i + 1);
    }
    while (z[i] + i < n && s[z[i]] == s[i + z[i]]) z[i]++;
    if (i + z[i] - 1 > r) {
      l = i;
      r = i + z[i] - 1;
    }
  }
  return z;
}
int dp[5001];
int n, a, b;
string s;
int mx[5001];
int func(int l) {
  if (l == n) return 0;
  if (dp[l] != INT_MAX) return dp[l];
  for (int i = 0; i <= mx[l]; i++) {
    if (i == 0) {
      dp[l] = min(dp[l], a + func(l + 1));
    } else {
      dp[l] = min(dp[l], b + func(l + i));
    }
  }
  return dp[l];
}
void solve() {
  cin >> n >> a >> b;
  cin >> s;
  for (int i = 0; i < n; i++) {
    dp[i] = INT_MAX;
    string t = s.substr(i);
    vector<int> z = zalgo(t);
    for (int j = 1; j < z.size(); j++) {
      mx[j + i] = max(mx[j + i], min(z[j], j));
    }
  }
  cout << func(0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T = 1;
  while (T--) {
    solve();
  }
}
