For an eight-stage pipeline (IF ID1 ID2 EX1 EX2 EX3 MEM WB),…

For an eight-stage pipeline (IF ID1 ID2 EX1 EX2 EX3 MEM WB), branches are resolved in the ID2 stage. The pipeline only stalls for branch miss-predictions. For a branch-heavy workload, where 40 percent of all instructions are branches, and the prediction accuracy is 95 percent, what is the Average CPI of the pipeline? Please show your work for credit.