let input:[Int] = readLine()!.split(separator: " ").map{Int($0)!} for i in 1 ... 10 { if input[i-1] != i { print(i) break } }