title: find number of tennis matches required
body: <p>Hi I came across this question from my friend.</p>
  
  <p>Give me a generalised formula to find how many tennis matches (singles) are required for n players ?</p>
  
  <p>Example : if the number of players are 16 then</p>
  
  <p>first : we need 8 mataches (for 16 players) , here 8 players will be eliminated and 8 players will be there</p>
  
  <p>secode : we need 4 matches (for 8 players) , here again 4 players will be eliminated and 4 will be remaining</p>
  
  <p>third : 
   we need 2 matches (for 4 players) , here again 2 players will be eliminated and 2
   will be remaining</p>
  
  <p>Final :
    we need 1 macth to decide a winner among the 2 players</p>
  
  <p>so totally 15 matches are required.</p>
  
  <p>I need a generalised formula to find , such that if I give the value n I should get the number of matches required to find the winner</p>
  
  <p>n may be odd or even</p>