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>
int w = 0;
int const oo = (int)10e6;
using namespace std;
char vowels[] = {'a', 'o', 'e', 'u', 'i'};
int A[2 * 100000];
long long n, m;
bool cycle = false;
bitset<64> bt;
set<int> st;
vector<bool> comp;
vector<bool> vis;
vector<bool> vis2;
vector<vector<int>> v;
map<int, int> mp;
map<char, int> mp2;
priority_queue<long long, vector<long long>, greater<long long>> pq;
bool viss[100][100] = {0};
int l1, l2;
int saved[100][100];
long long savedans[100000] = {1};
vector<pair<int, int>> v2;
vector<long long> vc;
vector<long long> va;
char gr[1000][1000];
bool even(long long x) { return ((n & 1) == 0) ? 1 : 0; }
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long n, long long m) { return (n * m) / gcd(n, m); }
string toBinary(int n) {
  string r;
  while (n != 0) {
    r = (n % 2 == 0 ? "0" : "1") + r;
    n /= 2;
  }
  return r;
}
bool prime(long long n) {
  if (n == 0 || n == 1) return 1;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
bool isvowels(char a) {
  for (int i = 0; i < 5; i++)
    if (a == vowels[i]) return true;
  return false;
}
long long binary_search(long long x, long long y) {
  int l = 0, r = y, mid;
  while (l <= r) {
    mid = l + (r - l) / 2;
    if (mid * (mid + 1) == x)
      break;
    else if (mid * (mid + 1) >= x)
      r = mid - 1;
    else
      l = mid + 1;
  }
  if (mid * (mid + 1) == x)
    return mid;
  else
    return -1;
}
bool bal(string z) {
  string x = z;
  reverse(x.begin(), x.end());
  if (z == x)
    return true;
  else
    return false;
}
void fast() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
}
bool F(int i, long long sum) {
  if (i == n) return sum % m == 0;
  if (savedans[i] != -1) return savedans[i];
  if (F(i + 1, sum + vc[i]) || F(i + 1, sum - vc[i])) return 1;
  return 0;
}
int FEB(int n) {
  if (n <= 1) return 1;
  if (savedans[n] != -1) return savedans[n];
  return savedans[n] = FEB(n - 1) + FEB(n - 2);
}
int arr1[100005] = {-1}, arr2[100005] = {-1};
long long minn;
void Dfs(int u, int p, int c) {
  if (vis[u]) return;
  vis[u] = 1;
  for (int i = 0; i < v[u].size(); i++) {
    if (!vis[v[u][i]]) Dfs(v[u][i], u, c);
  }
  return;
}
int find(int u) {
  if (A[u] == u)
    return u;
  else
    return A[u] = find(A[u]);
}
bool valied(int x, int y) {
  if (x >= n || y >= m || x < 0 || y < 0) return 0;
  return 1;
}
int maxxx(int x, int y) {
  if (!valied) return 0;
  if (saved[x][y] != -1) return saved[x][y];
}
string ok = "YES", no = "NO";
map<pair<int, int>, int> mpp;
int bi_s(int x, int f) {
  int l = 0, r = n - 1, mid;
  if (f != -1) l = f + 1;
  while (l <= r) {
    mid = l + (r - l) / 2;
    if (f != -1) {
      if (vc[mid] - vc[f] > x)
        r = mid - 1;
      else if (vc[mid] - vc[f] < x)
        l = mid + 1;
      else
        break;
    } else {
      if (vc[mid] > x)
        r = mid - 1;
      else if (vc[mid] < x)
        l = mid + 1;
      else
        break;
    }
  }
  return mid;
}
bool anns = false;
vector<long long> cost;
long long miiiin = INT_MAX;
void CDfs(int u, int p, int nw) {
  if (vis2[u]) return;
  miiiin = min(miiiin, cost[u]);
  vis2[u] = 1;
  for (int i = 0; i < v[u].size(); i++)
    if (v[u][i] != p) CDfs(v[u][i], u, nw);
}
bool fff = false;
void fs(int u, int p) {
  if (vis[u]) {
    cycle = true;
    return;
  }
  vis[u] = 1;
  for (int i = 0; i < v[u].size(); i++) {
    if (comp[v[u][i]]) fff = true;
    if (!vis[v[u][i]]) fs(v[u][i], u);
  }
  comp[u] = true;
}
long long b_search(long long x, long long y, long long z) {
  long long l = 0, r = z, mid, ans = r;
  while (l <= r) {
    mid = l + (r - l) / 2;
    long long xx = (mid / x), yy = (mid / y);
    if (xx + yy >= n) {
      r = mid - 1;
      ans = min(ans, mid);
    } else if (xx + yy == n)
      break;
    else
      l = mid + 1;
  }
  return ans;
}
int main() {
  cin >> n;
  string x;
  cin >> x;
  long long c = 1;
  long long p = 0;
  for (int i = 1; i < n;) {
    p = 0;
    bool f = false;
    int pp = 0;
    for (int j = 0; j < i; j++) {
      if (!(x[j] == x[j + i]))
        break;
      else
        p++;
      if (j == i - 1) f = true, pp = j + p;
    }
    if (f)
      i = pp + 1, c++;
    else
      c++, i++;
  }
  cout << c;
}
