#include <bits/stdc++.h>
using namespace std;
string s;
int n;
const int maxn = 150;
long long dp[maxn][2];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> n;
  cin >> s;
  dp[0][0] = 1;
  dp[0][1] = 1;
  for (int i = 1; i < s.size(); i++) {
    if (i % 2 == 0) {
      dp[i][0] = dp[i - 1][0] + 1;
      dp[i][1] = dp[i - 1][1] + 1;
    } else {
      int pos = i / 2;
      bool same = true;
      for (int j = 0; j <= pos; j++) {
        if (s[j] != s[j + pos + 1]) same = false;
      }
      dp[i][0] = dp[i - 1][0] + 1;
      dp[i][1] = dp[i - 1][1] + 1;
      if (same) dp[i][1] = min(dp[i][1], dp[pos][0] + 1);
    }
  }
  cout << dp[s.size() - 1][1];
  return 0;
}
