A 50 meter chain with uniform density and a mass of 40 kilograms is hanging from the roof of a building under construction. How much work (in Nm) is required to pull the chain up?