Note: I'm not asking about monarchical personal unions. I seem to recall this happening a bit in Italy, but can't recall any specifics.
You're asking whether two (or more) different countries elected the same head of state, right? Do you mean simultaneously 'X served at the same time as president of Footonia and Baristan', or consecutively 'X was President of Footonia for five years and Baristan for eight'.
If the latter, people like Vaclav Havel might count, since he was President of Czechoslovakia for three years and then President of Czech Republic after the split.
But perhaps the most famous person was Simon Bolivar who was briefly simultaneously the president of three countries: Upper Peru (or Bolivia), Peru, and Gran Colombia. (Not an expert on Hispanic America, though).