#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) { cerr << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << ": " << a << " ";
  err(++it, args...);
}
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
using vi = vector<int>;
using vii = vector<pii>;
using vs = vector<string>;
const int DR[] = {-1, 0, 1, 0};
const int DC[] = {0, -1, 0, 1};
const double PI = acos(-1.0);
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int INF = 1073741823;
const ll INFLL = 4e18;
const int MAX = 100;
int N;
string s;
void read() { cin >> N >> s; }
void solve() {
  int ans = N;
  for (int i = (int)N - 1; i >= (int)0; i--) {
    if (s.substr(0, i + 1) == s.substr(i + 1, i + 1)) {
      ans = min(ans, N - i);
    }
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int TC = 1;
  while (TC--) {
    read();
    solve();
  }
}
