fun main(args:Array<String>) {
	val n = readLine()!!.toInt()
	val s = readLine()!!
	
	
	(1 until n).map { i->
		val a=s.take(i).toList().distinct()
		val b=s.drop(i).toList().distinct()
		return@map a.count{it in b}
	}.max()!!.let {
		println(it)
	}
}