the foreigners would provide billions and billions in long-term , low-interest loans and a flood of subsidized consumer goods to erase the pain of perestroika , providing the president with the badly needed financing , not to mention popular support , he needed to bring it off .