@a=1..<>;$/=$";unshift@a,splice@a,$_-1,1for<>;print$a[0]