#include <bits/stdc++.h>
using namespace std;
int dx[8] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};
int main() {
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    string S;
    cin >> S;
    if (n == 1) {
      cout << 1;
      continue;
    }
    long long int end = n;
    if (n % 2) end--;
    long long int len = 0;
    string A = "", B = "";
    for (long long int i = 0; i < n; i++) {
      A += S[i];
      long long int d = A.size();
      B = S.substr(i + 1, d);
      if (A == B) {
        len = A.size();
      }
    }
    if (len != 0)
      cout << len + 1 + (n - 2 * len) << "\n";
    else
      cout << n << "\n";
  }
  return 0;
}
