What is the total amount of 4″ roof drain pipe required for the piping system shown in the diagram?

What is the total amount of 4″ roof drain pipe required for the piping system shown in the diagram?