https://www.acmicpc.net/problem/14656
import java.util.*
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
var n=s.nextInt()
var count=0
for(i in 1..n){
var a=s.nextInt()
if(a!=i) count++
}
print(count)
}