#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const int M = 5000 + 3;
vector<int> z_function(string s) {
  int n = s.size(), l = 0, r = 0;
  vector<int> z(n, 0);
  for (int i = 1; i < n; i++) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n and 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 main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  vector<int> z[n];
  int dp[n];
  for (int i = 0; i < n; i++) {
    string ss(s.begin() + i, s.end());
    z[i] = z_function(ss);
  }
  fill(dp, dp + n, 1e9);
  dp[0] = a;
  for (int i = 1; i < n; i++) {
    dp[i] = min(dp[i], dp[i - 1] + a);
    int mx = 0;
    for (int j = 0; j < i; j++) {
      mx = max(mx, min(z[j][i - j], i - j));
    }
    for (int j = i; j < i + mx; j++) {
      dp[j] = min(dp[j], dp[i - 1] + b);
    }
  }
  cout << dp[n - 1];
}
