The length of each of the legs of an isosceles triangle is 3 km longer than the base. The perimeter of the triangle is 24 km. How do you find the length of each side?