how to calculate the cost of a wood fence by the foot