Inna love sleep need n alarm clock total wake Lets suppose innas room 100100 square low left corner point 00 upper right corner point 100100 then alarm clock point integer coordinate squarethe morning come all n alarm clock Innas room ring Inna want turn for Inna come amusing game First Inna choose type segment use game the segment vertical horizontal then Inna make multiple move in single Inna paint segment length plane choose type beginning game vertical horizontal alarm clock segment switch the game end alarm clock switch Inna sleepy want alarm clock soon possible help find minimum number move game need turn alarm clock