In step $1$, every processor decides, with probability $4/n$, whether to send a leader-election message message to its neighbor(s), using the minimum-ID protocol to decide the leader. If, during the next $n$ steps, a node receives a message, it computes the minimum of the sent ID and its own ID and sends this message on. If a node receives a message containing its own ID, then it knows it is the leader, and it informs the rest of the processors of this fact. If a processor receives no messages in the first $n$ steps, however, then none of them sent any messages. In this case, we repeat the compution. The first phase uses $O(n)$ expected packets, since the expected number of processors that send messages is $4$. Likewise, the probability that some processor sends a message is at least $1/2$. Thus, the expected number of rounds we have to iterate before electing a leader is at most $2$.