Calculate the perimeter of a rectangle