Calculate the Perimeter of Shapes