#include <bits/stdc++.h>
using namespace std;
const int L = 1000000 + 10;
int main() {
  int n;
  scanf("%d", &n);
  char s[n + 10];
  scanf("%s", s);
  int next[n + 10];
  next[0] = -1;
  int j = 0, k = -1;
  int maxn = 1;
  while (j < n) {
    if (k == -1 || s[j] == s[k]) {
      next[++j] = ++k;
      int xun = j - next[j];
      maxn = max(maxn, j / xun / 2 * xun);
    } else
      k = next[k];
  }
  printf("%d\n", n - maxn + 1);
  return 0;
}
