Check if initially all the coins are facing towards head
Pair < Integer , Integer > p = new Pair < Integer , Integer > ( 0 , 0 ) ; if ( s == ' H ' ) { p = new Pair < Integer , Integer > ( ( int ) Math . floor ( N / 2.0 ) , ( int ) Math . ceil ( N / 2.0 ) ) ; }