dnd 5e – How does haste interact with the heavy armor penalty?

For a character that is wearing heavy armor, but does not have the prerequisite strength, there is a 10ft speed penalty.

If the Armor table shows “Str 13” or “Str 15” in the Strength column for an armor type, the armor reduces the wearer’s speed by 10 feet unless the wearer has a Strength score equal to or higher than the listed score.

Haste doubles the speed of the person it was cast on.

Until the spell ends, the target’s speed is doubled

Since the movement speed of heavy armor is a fixed amount, does the doubling apply to the base speed or the current speed?
Eg. A human with a base speed of 30. They put on heavy armor and have their speed reduced to 20. Haste is cast on them, does their speed become 30×2 – 10 = 50 or (30-10)×2=40?