Finding the maximum area with a given perimeter