Function to find largest string which satisfy condition
static int CountTotal ( string str ) { int ans = 0 ; int n = str . Length ; char [ ] s = str . ToCharArray ( ) ; int cnt = 0 ; for ( int i = 0 ; i < n ; i ++ ) {