import sequtils,strutils var b = stdin.readLine.split.map parseInt var n = 1 for (i,j) in b.zip (1..9).toSeq: if i == j: n = j echo n + 1