Find the perimeter of a polygon