How to calculate the perimeter of a square