What is the alogarithm for solving the perimeter of a triangle