What will be the code for just counting the total possibalities

what will be the code for just counting the total possibalities i can’t figure it out

hi @nitishkumar7015_6cb4c93ae8252a59 its equivalent to catalan nos. u can read about it