A gas in a cylinder is compressed from an initial volume of \( 5 \, \text{m}^3 \) to a final volume of \( 2 \, \text{m}^3 \) while maintaining a constant pressure of \( 1 \times 10^5 \, \text{Pa} \). Calculate the work done by the gas during the compression.