Solution to Polygon Perimeter