#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MXX = 1e5 + 5;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int n;
  cin >> n;
  string s, curr = "";
  cin >> s;
  int ans = -1;
  for (int i = 0; i < (int)s.size(); i++) {
    curr += s[i];
    string tmp = "";
    for (int j = i + 1;
         j <= (i + (int)curr.size()) && (i + (int)curr.size()) < n; j++) {
      tmp += s[j];
    }
    if (tmp == curr) {
      ans = max(ans, (int)tmp.size());
    }
  }
  if (ans == -1) return cout << n << endl, 0;
  int res = ans + ans;
  res = n - res;
  cout << res + (ans + 1);
  return 0;
}
