How to calculate the duration of construction activities