#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    vector<pair<int, int> > vp;
    map<string, int> m;
    set<string> st;
    string s1, s2;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j <= i; j++) {
        s1 += s[j];
      }
      if (!st.count(s1)) {
        st.insert(s1);
        std::string::size_type pos = 0;
        int occ = 0;
        while ((pos = s.find(s1, pos)) != std::string::npos) {
          occ++;
          pos += s1.length();
        }
        m[s1] = occ;
        if (occ > 1) {
          s2 = s1;
          s1 += s1;
          bool f = false;
          for (int i = 0; i < s1.size(); i++) {
            if (s[i] != s1[i]) f = true;
          }
          if (!f) {
            vp.push_back({s2.size(), occ});
          }
        }
        occ = 0;
      }
      s1.clear();
    }
    sort((vp).begin(), (vp).end());
    int x, y;
    if (vp.size() > 0) {
      x = vp[vp.size() - 1].first;
      y = vp[vp.size() - 1].second;
    }
    cout << (vp.size() > 0 ? x + 1 + (n - (x + x)) : n) << "\n";
  }
  return 0;
}
