fun main() { val n_num = readLine()!!.toInt(); val arr = Array(n_num) { readLine()!!.toLong() } arr.sort() arr.reverse() var now = Long.MAX_VALUE var cnt = 1 for (i in arr.indices) { val ai : Long = arr[i] if (ai + 1 < now) { now = ai } else { now = ai cnt++ } } println(cnt) }