fun main(args: Array) { val list = listOf(1, 2, 3, 4, 5, 6, 7, 9, 10) for (i in 0 until 10) { if (list[i] != i + 1) { println(i + 1) return } } }