#include <bits/stdc++.h>
using namespace std;
int dist[102][2];
string s;
int bfs() {
  memset(dist, -1, sizeof(dist));
  dist[0][0] = 0;
  queue<pair<int, int> > q;
  q.push(make_pair(0, 0));
  while (!q.empty()) {
    int pos = q.front().first;
    int type = q.front().second;
    q.pop();
    if (pos == s.size()) return dist[pos][type];
    if (pos == 0 && dist[pos + 1][type] == -1) {
      dist[pos + 1][type] = dist[pos][type] + 1;
      q.push({pos + 1, type});
      continue;
    }
    if (pos == 0) continue;
    if (type == 0) {
      int len = pos;
      if (s.substr(0, len) == s.substr(len, len) && dist[pos + len][1] == -1) {
        dist[pos + len][1] = dist[pos][0] + 1;
        q.push({pos + len, 1});
      }
    }
    if (dist[pos + 1][type] == -1) {
      dist[pos + 1][type] = dist[pos][type] + 1;
      q.push({pos + 1, type});
      continue;
    }
  }
  return -1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  cin >> s;
  cout << bfs();
  return 0;
}
