#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string a;
  cin >> a;
  int ans = n;
  for (int i = 0; i < n; i++) {
    int k = 0;
    for (int j = i + 1; j < n; j++) {
      if (a[j] == a[k]) {
        k++;
      } else
        break;
      if (k == i + 1) break;
    }
    if (k == i + 1) {
      ans = min(ans, n - k + 1);
    }
  }
  cout << ans;
  return 0;
}
