Suppose that the angles of triangle $ABC$ satisfy
\[\cos 3A + \cos 3B + \cos 3C = 1.\]Two sides of the triangle have lengths 10 and 13.  Find the maximum length of the third side.The answer is in the form k\sqrt{m}+n,. Please provide the value of k + m + n.

Let's think step by step and output the final answer within \boxed{}.
user