5
ababa
 8
aaabcabc
 7
abcdabc
 29
abbabbaabbbbaababbababbaabbaa
 5
baaaa
 54
dgafkhlgdhjflkdafgjldjhgkjllfallhsggaaahkaggkhgjgflsdg
 7
abcdbcd
 20
ccbbcbaabcccbabcbcaa
 11
ababcabcabc
 9
azxcvzxcv
 10
wvwlwvwwvw
 11
ababababccc
 7
dabcabc
 6
abcabd
 12
ababababvvvv
 11
jjlkalfhdhh
 6
abbbba
 8
ababcdef
 10
ababcababc
 7
ababbcc
 6
ablfab
 45
bbbbbbbabababbbaabbbbbbbbbbbbabbbabbaabbbabab
 100
mhnzadklojbuumkrxjayikjhwuxihgkinllackcavhjpxlydxcmhnzadklojbuumkrxjayikjhwuxihgkinllackcavhjpxlydxc
 5
aaaaa
 99
lhgjlskfgldjgadhdjjgskgakslflalhjfgfaaalkfdfgdkdffdjkjddfgdhalklhsgslskfdhsfjlhgajlgdfllhlsdhlhadaa
 10
adadadadad
 46
kgadjahfdhjajagdkffsdfjjlsksklgkshfjkjdajkddlj
 7
aabcdaa
 1
s
 4
ttob
 16
abcdabcdabcdabcd
 1
a
 37
lglfddsjhhaagkakadffkllkaagdaagdfdahg
 7
aabaaaa
 12
abaabaabaaba
 27
aaaaaaaaaaaaaaaaaaaaaaaaaaa
 17
abcdefggggglelsoe
 32
bbbbaaabbaabbaabbabaaabaabaabaab
 9
abbbbabbb
 10
asdasdasda
 10
bbbbbbbbbc
 11
abcabcabcab
 20
aabaabaabaabaabaabaa
 8
abcabcde
 6
abcaca
 7
aabcabc
 100
yeywsnxcwslfyiqbbeoaawtmioksfdndptxxcwzfmrpcixjbzvicijofjrbcvzaedglifuoczgjlqylddnsvsjfmfsccxbdveqgu
 16
bbbbbbaaaaaaaaaa
 77
babbaababaabbaaaabbaababbbabaaaabbabaaaaaaaabbbaaabbabbbabaababbabaabbbbaaabb
 8
aaaaaaaa
 6
ababab
 3
lsl
 12
wwvwwvwwvwwv
 10
ababababab
 8
ffffffff
 10
abcdeeeeee
 8
abbbbbba
 16
uuuuuuuuuuuuuuuu
 9
baaaabaaa
 7
zabcabc
 6
aaaaaa
 8
abcdeabc
 12
ababababbbbb
 14
abcdefgabcdepq
 6
ajkoaj
 3
aaa
 81
aaaaaababaabaaaabaaaaaaaabbabbbbbabaabaabbaaaababaabaababbbabbaababababbbbbabbaaa
 8
abcdefef
 8
abbababa
 9
abcdeabcd
 14
abcabcabcabcjj
 8
acacacac
 86
ssjskldajkkskhljfsfkjhskaffgjjkskgddfslgjadjjgdjsjfsdgdgfdaldffjkakhhdaggalglakhjghssg
 11
abcdeabcdfg
 38
asdsssdssjajghslfhjdfdhhdggdsdfsfajfas
 10
bbbbbbbaaa
 8
baaaaaaa
 5
abcbc
 8
ababcabc
 66
ldldgjllllsdjgllkfljsgfgjkflakgfsklhdhhallggagdkgdgjggfshagjgkdfld
 92
bbbbbabbbaaaabaaababbbaabbaabaaabbaabababaabbaabaabbbaabbaaabaabbbbaabbbabaaabbbabaaaaabaaaa
 10
abcabcabca
 5
aabaa
 12
abcabcabcabc
 8
aaaabcde
 8
abbbbbbb
 10
abcabcdddd
 20
abcdabcdeeeeeeeeabcd
 5
abbbb
 16
aaaaaabbaaaaaabb
 10
aaaacaaaac
 10
aaaaaaaaaa
 7
abababa
 8
aaaaaass
 7
abacbac
 36
bbabbaabbbabbbbbabaaabbabbbabaabbbab
 8
aabcabca
 10
abccaaaaba
 8
asafaass
 14
aaabcabcabcabc
 79
lsfgfhhhkhklfdffssgffaghjjfkjsssjakglkajdhfkasfdhjhlkhsgsjfgsjghglkdkalaajsfdka
 7
mabcabc
 17
ababababzabababab
 8
abababaa
 10
abcdabcefg
 17
abcdefgggggabcdef
 13
eabcdefabcdef
 8
abababab
 28
aaaaaaaaaaaaaaibfprdokxvipsq
 13
aabbbkaakbbbb
 4
abab
 9
zabcdabcd
 70
babababbabababbbabaababbababaabaabbaaabbbbaababaabaabbbbbbaaabaabbbabb
 9
abcabcabc
 2
aa
 100
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 4
aaaa
 36
babbbbababaaabbabbbaabaabbbbbbbbbbba
 9
asdfgasdf
 13
aabaabaabaabx
 95
bbaaaabaababbbabaaaabababaaaaaabbababbaabbaaabbbaaaabaaaaaaababababbabbbaaaabaabaababbbbbababaa
 5
xabab
 20
hhhhhhhhhhhhhhhhhhhh
 41
abbababbbbbabbbabaaaababaaabaabaaabbbbbbb
 8
pppppppp
 5
abcab
 10
avavavavbc
 12
aaaaaaaaaaaa
 63
jhkjhadlhhsfkadalssaaggdagggfahsakkdllkhldfdskkjssghklkkgsfhsks
 9
aaaaaaaaa
 6
abcbcd
 16
aaaaaaaaaaaaaaaa
 9
asdfpasdf
 12
aabaabaabaab
 74
ghhhfaddfslafhhshjflkjdgksfashhllkggllllsljlfjsjhfggkgjfalgajaldgjfghlhdsh
 39
jflfashaglkahldafjasagasjghjkkjgkgffgkk
 10
adcbeadcfg
 5
cabab
 6
ababbb
 99
trolnjmzxxrfxuexcqpjvefndwuxwsukxwmjhhkqmlzuhrplrtrolnjmzxxrfxuexcqpjvefndwuxwsukxwmjhhkqmlzuhrplrm
 7
abcaabc
 6
aabbbb
 87
fhjgjjagajllljffggjjhgfffhfkkaskksaalhksfllgdjsldagshhlhhgslhjaaffkahlskdagsfasfkgdfjka
 8
baaaaaab
 5
aavaa
 5
aabab

4
 8
 7
 27
 5
 54
 7
 20
 10
 9
 10
 8
 7
 6
 9
 11
 6
 7
 6
 6
 6
 43
 51
 4
 99
 7
 46
 7
 1
 4
 9
 1
 37
 7
 7
 15
 17
 31
 9
 8
 7
 9
 12
 6
 6
 7
 100
 14
 77
 5
 5
 3
 7
 7
 5
 10
 8
 9
 9
 7
 4
 8
 9
 14
 6
 3
 79
 8
 8
 9
 9
 5
 86
 11
 38
 8
 8
 5
 7
 65
 91
 8
 5
 7
 7
 8
 8
 17
 5
 9
 6
 6
 6
 6
 7
 34
 8
 10
 8
 14
 79
 7
 14
 7
 10
 17
 13
 5
 22
 13
 3
 9
 64
 7
 2
 51
 3
 36
 9
 8
 95
 5
 11
 41
 5
 5
 7
 7
 63
 6
 6
 9
 9
 7
 74
 39
 10
 5
 5
 51
 7
 6
 87
 8
 5
 5

#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x) {
  cin >> x;
}
template <typename T, typename T0>
void read(T &x, T0 &y) {
  cin >> x >> y;
}
template <typename T, typename T0, typename T1>
void read(T &x, T0 &y, T1 &z) {
  cin >> x >> y >> z;
}
template <typename T, typename T0, typename T1, typename T2>
void read(T &x, T0 &y, T1 &z, T2 &w) {
  cin >> x >> y >> z >> w;
}
template <typename T, typename T0>
void read(pair<T, T0> &p) {
  cin >> p.fst >> p.scd;
}
template <typename T>
void read(vector<T> &oneD) {
  for (long long int i = 0; i < oneD.size(); i++) {
    read(oneD[i]);
  }
}
template <typename T>
void read(T oneD[], long long int n) {
  for (long long int i = 0; i < n; i++) {
    read(oneD[i]);
  }
}
template <typename T>
void write(T &x) {
  cout << x << " ";
}
template <typename T, typename T0>
void write(T &x, T0 &y) {
  cout << x << " " << y << "\n";
}
template <typename T, typename T0, typename T1>
void write(T &x, T0 &y, T1 &z) {
  cout << x << " " << y << " " << z << "\n";
}
template <typename T, typename T0, typename T1, typename T2>
void write(T &x, T0 &y, T1 &z, T2 &w) {
  cout << x << " " << y << " " << z << " " << w << "\n";
}
template <typename T, typename T0>
void write(pair<T, T0> &p) {
  write(p.fst);
  write(p.scd);
  cout << endl;
}
template <typename T>
void write(vector<T> &oneD) {
  for (long long int i = 0; i < oneD.size(); i++) {
    write(oneD[i]);
  }
  cout << endl;
}
template <typename T>
void write(T oneD[], int n) {
  for (long long int i = 0; i < n; i++) {
    write(oneD[i]);
  }
  cout << endl;
}
template <typename T, typename T0>
void write(map<T, T0> &mpp) {
  for (auto it : mpp) {
    write(it.fst);
    cout << ": ";
    write(it.scd);
    cout << "\n";
  }
  cout << endl;
}
vector<long long int> seive;
void Seive() {
  const long long int maxn = 1000005;
  seive.resize(maxn);
  for (long long int(i) = 0; (i) < (maxn); ++(i)) seive[i] = i;
  seive[1] = -1;
  seive[0] = -1;
  long long int c = 1;
  for (long long int(i) = 2; (i) <= (maxn); (i) += (1)) {
    if (i == seive[i]) {
      seive[i] = c;
      for (long long int j = 2 * i; j < maxn; j += i) {
        if (seive[j] == j) {
          seive[j] = c;
        }
      }
      c++;
    }
  }
}
long long int extended_GCD(long long int a, long long int b, long long int &x,
                           long long int &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long int x1, y1;
  long long int gcd = extended_GCD(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return gcd;
}
long long int power(long long int a, long long int b,
                    long long int m = 1000000007) {
  a %= m;
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long int powe(long long int a, long long int b,
                   long long int m = 1000000007) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long int modinv(long long int a, long long int mod = 1000000007) {
  long long int x, y;
  extended_GCD(a, mod, x, y);
  if (x < 0) x += mod;
  return x;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
string getString(char x) {
  string s(1, x);
  return s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int n;
  read(n);
  string s;
  read(s);
  long long int ma = 1;
  for (long long int(i) = 1; (i) <= (n); (i) += (1)) {
    long long int k = 0;
    string a = "", b = "";
    for (long long int(j) = k; (j) <= (k + i - 1); (j) += (1)) {
      if (j >= n) break;
      a += getString(s[j]);
    }
    for (long long int(j) = k + i; (j) <= (k + 2 * i - 1); (j) += (1)) {
      if (j >= n) break;
      b += getString(s[j]);
    }
    if (a == b && a != "") {
      ma = max(ma, i);
    }
  }
  cout << (n - ma + 1);
  return 0;
}
