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