The President of India is the head of state and first citizen of India and the Supreme Commander of the Indian armed forces. The President is elected by the elected members of the Parliament of India as well as of the state legislatures, and serves for a term of five years.
A formula is used to allocate votes so there is a balance between the population of each state and the number of votes assembly members from a state can cast, and to give an equal balance between State Assembly members and National Parliament members. If no candidate receives a majority of votes there is a system by which losing candidates are eliminated from the contest and votes for them transferred to other candidates, until one gains a majority.
The President enjoys executive powers, judicial powers, legislative powers and emergency powers.