Here's the main insight: as long as they're both alive, the other two cowboys will shoot at each other, not at you. It's best to let one of them shoot the other, whereupon it will be your turn again. If you shoot one of them, it will then be the other one's turn, and he might shoot you before you get another turn.
For calculating your odds, observe the following: If you're in a duel with just one of the other two cowboys, your odds of survival are at least 1/3 if you have the first shot, and strictly less than 1/3 if the other cowboy has the first shot.
Let's apply this observation to the case of two other cowboys. If you hit one of them, then what remains of the contest is a two-way duel where the other guy has the first shot. Your odds of survival are less than 1/3. If you shoot up in the air, the other cowboys, who are also motivated to maximize their chance of survival, will shoot at each other before they turn their attention to you. Since Cowboy 3 is a perfect shot, after the first round, one of them will be dead, and it will be your turn again. What remains of the contest is a two-way duel where you have the first shot.
For a precise analysis of the odds, and other commentary, click here.
(I once told the problem to a businessman who isn't very good at math and didn't get this solution. However, when he heard it, he offered the following improvement that I hadn't thought of: Offer to forgo your first turn in exchange for two shots on your second turn.)
People who got this solution: Nicholas Rohrbacke, Nick Krier,
Tim O'Connor, Onyx Mueller, Troy Butler, Saravanan Sellappa, Doug Beeman,
Andres Alvarez. In a process reminiscent of the duel, I used coin
flips to randomly eliminate people from this list until one of them was
left standing: Troy Butler. Troy wins the ice cream.