Put a cat under the flag and then when you have 1 step left clone a cat into the flag. The cat under the flag will then be out of moves
Go left from here