Sam is building a wooden fence around his rectangular backyard. The length of the yard is 15 feet, and the width is 10 feet. He plans to add a gate that will take up 2 feet of the length. What will be the total length of the fence he needs to build, excluding the gate?