import std.stdio, std.conv, std.string, std.algorithm, std.array; void main(){ const string[] input = readln.split; const int[] arr = input.map!(to!int).array; foreach(idx, val; arr){ if(idx+1 != val){ writeln(idx+1); return; } } writeln(10); }