read N
read S

for n in `seq 1 $((N-1))`; do
        X=`echo $S | awk '{print substr($0,1,'$n')}'`
        Y=`echo $S | awk '{print substr($0,'$((n+1))')}'`
        cat <(echo $X | fold -s1 | sort | uniq) <(echo $Y | fold -s1 | sort | uniq) | sort | uniq -d | wc -l
done | sort -nr | head -1