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

import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static InputReader in;
    static PrintWriter out;
    static long time_start;
    static int cas = 0;
    static double eps = 1e-8;
    static int mod = (int) 12357;
    static int inf = 0x3f3f3f3f;
    static long inff = 0x3f3f3f3f3f3f3f3fL;
    static int maxn = (int) 150000 + 5;


    static void solve() throws Exception {
        while (in.hasNext()) {
            int n = in.nextInt();
            String s = in.next();
            int ans = n;
            for (int i = 1; i < n; ++i) {
                if (i * 2 <= n) {
                    String a = s.substring(0, i);
                    String b = s.substring(i, i + i);
                    if (a.equals(b)) ans = Math.min(ans, n - 2*i + i + 1);
                }
            }
            out.println(ans);
        }
    }

    static void swap(int[] arr, int i, int j) {
        if (i != j) {
            arr[i] ^= arr[j];
            arr[j] ^= arr[i];
            arr[i] ^= arr[j];
        }
    }

    static void reverse(int[] arr, int i, int j) {
        while (i < j) {
            swap(arr, i++, j--);
        }
    }

    public static void main(String[] args) throws Exception {
        openIO();
        solve();
        closeIO();
    }

    static void openIO() throws Exception {
        try {
            time_start = 0;
            FileInputStream fi = new FileInputStream("night_input");
            System.setIn(fi);
            time_start = System.currentTimeMillis();
        } catch (Exception ex) {
            //hello night_13
        }

        in = new InputReader(System.in);
        out = new PrintWriter(new BufferedOutputStream(System.out));
    }

    static void closeIO() throws IOException {
        out.flush();

        if (time_start != 0) {
            out.println();
            out.print("time cost: ");
            out.print(System.currentTimeMillis() - time_start);
            out.println(" ms");
        }
        in.close();
        out.close();
    }
}


class InputReader {
    private BufferedReader br;
    private StringTokenizer st;

    public InputReader(InputStream stream) throws IOException {
        br = new BufferedReader(new InputStreamReader(stream));
        eat("");
    }

    private void eat(String s) {
        st = new StringTokenizer(s);
    }

    public String nextLine() throws IOException {
        return br.readLine();
    }

    public boolean hasNext() throws IOException {
        while (!st.hasMoreTokens()) {
            String s = nextLine();
            if (s == null) return false;
            eat(s);
        }
        return true;
    }

    public String next() throws IOException {
        hasNext();
        return st.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    public double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    public BigInteger nextBigInteger() throws IOException {
        return new BigInteger(next());
    }

    public BigDecimal nextBigDecimal() throws IOException {
        return new BigDecimal(next());
    }

    public int[] nextIntArray(int n) throws IOException {
        int[] arr = new int[n];
        for (int i = 0; i < n; ++i) {
            arr[i] = nextInt();
        }
        return arr;
    }

    public double[] nextDoubleArray(int n) throws IOException {
        double[] arr = new double[n];
        for (int i = 0; i < n; ++i) {
            arr[i] = nextDouble();
        }
        return arr;
    }

    public char[] nextCharArray() throws IOException {
        return next().toCharArray();
    }

    public int[] nextIntArray(int n, int st) throws IOException {
        n += st;
        int[] arr = new int[n];
        for (int i = st; i < n; ++i) {
            arr[i] = nextInt();
        }
        return arr;
    }

    public double[] nextDoubleArray(int n, int st) throws IOException {
        n += st;
        double[] arr = new double[n];
        for (int i = st; i < n; ++i) {
            arr[i] = nextDouble();
        }
        return arr;
    }

    public char[] nextCharArray(int st) throws IOException {
        String temp = "";
        while (st-- > 0) temp += " ";
        return (temp + next()).toCharArray();
    }

    public void close() throws IOException {
        br.close();
    }
}

