It was a complex combination of strategy calls that helped McLaren and Jenson Button master the Hungarian Grand Prix last weekend - and it proved how crucial split-second decisions are in Formula One.
The race involved three key elements - managing a drying track in the opening stint, choosing the right dry tyre strategy in the middle and deciding how to react to the rain shower in the latter stages.
Starting a race on a slippery track with constantly changing grip levels will always lead to drama, and after some exciting wheel-to-wheel battles on intermediate tyres it was Hamilton and Button who came out one-two once the leaders had all made the change to slicks.
The McLarens had simply been more comfortable on the intermediates and Hamilton, once past early leader Sebastian Vettel on lap five, was able to run between 0.7s and 1.2s per lap faster than the Red Bull driver in those conditions.
Helped by the reduced influence of downforce at the slow Hungaroring circuit, which reduced Red Bull's superiority in this area, the race ran well for McLaren after that as the teams all settled into a dry strategy.
However, with the quick drying track putting all top drivers on slicks by lap 12, they faced a strategy challenge - without enough super soft tyres to make it to the end they would have to use the soft tyre at some point so either they would need two or three more stops (making it a three- or four-stop race).
It was the decision between those two strategies that made the big difference for Button (even if Hamilton's later spin and subsequent penalty also dropped him further down the field).
Hamilton went with the post-inters plan to run three sets of super softs then finish off with a short run on the soft tyre - anticipating that the performance benefit from the super softs would overcome the time taken for the extra stop.
Button went the other way and decided to run just two sets of super softs before moving onto the soft tyres and trying to make them last - a decision made partly due to his ability to conserve tyres and partly due to extra information on relative tyre performance gathered by his garage in the two laps after Hamilton committed to his strategy on his third stop.
When Button stopped on lap 42 it was not clear which strategy was best, but it soon became apparent that his was the way to go, as long as he could make the tyres last to the end.
The two Red Bulls were both on the same strategy as Button but Alonso in the Ferrari sided with the same strategy as Hamilton.
Then came the rain.
This is when a split-second decision can either make you a hero or ruin your race - and nobody knows how it will play out.
At that time the two McLarens were nose to tail at the front but Button was likely to have the upper hand once the tyre strategies played out. The two Red Bulls and Alonso followed, with the lead pack covered by just 26 seconds.
Webber was the first to gamble for intermediates, with Hamilton following soon after. Weather radars predicted more rain, suggesting the early move could be the perfect play - but within two laps it had dried up and both were back in for dry tyres, with Hamilton then having to come in again to serve his stop-go penalty.
Button and Vettel chose not to pit and over the course of laps 50 to 57 there was just over a second between their cumulative lap times while Webber lost 40 seconds and Hamilton lost 53 including his stop-go.
"If it rains heavier, for another three or four minutes, then that's the right decision," mused Webber after the race. "That's the roll of the dice."
Indeed, while Hamilton was taken out the equation by his penalty, perhaps Webber could have won had the rain continued - but for Button, it was the fact he chose not to roll the dice that made him come out victorious.