The £5.2bn over five years will mean 2,000 new flood defences in England, the Treasury says.