#include <bits/stdc++.h>
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
const long long MAX = 500100;
const long long mod = 1000000007;
using namespace std;
void file() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
void zuka() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  zuka();
  int ans = 0, n;
  cin >> n;
  string s, hld = "";
  cin >> s;
  bool done = false;
  for (int i = (n - 1) / 2; i >= 0; i--) {
    string koko = s.substr(0, i + 1);
    if (s.find(koko, i + 1) == i + 1) {
      cout << n - i;
      done = true;
      break;
    }
  }
  if (!done) cout << n;
}
