Cooper is designing a rectangular sandbox for his backyard. The length of the sandbox is 3 feet longer than twice its width. If the perimeter of the sandbox is 36 feet, what is the width of the sandbox?