Check if initially all the coins are facing towards head
Tuple < int , int > p = Tuple . Create ( 0 , 0 ) ; if ( s == ' H ' ) { p = Tuple . Create ( ( int ) Math . Floor ( N / 2.0 ) , ( int ) Math . Ceiling ( N / 2.0 ) ) ; }