fun main(arr: Array<String>) {
    val n = readLine()!!.toInt()
    val s = readLine()!!
    val ans = (1 until n).map {cnt -> s.take(cnt).toSet().count { it in s.drop(cnt).toSet() } }.max()
    println(ans)
}


