Let \(ABCD\) be a trapezoid with \(AB \parallel CD\). Let \(a = AB\) and \(b = CD\). For \(MN \parallel AB\) such that \(M\) lies on \(AD\), \(N\) lies on \(BC\), and the trapezoids \(ABNM\) and \(MNCD\) have the same area, find the length of \(MN\). The original answer is in the form \(\sqrt{\frac{ka^2 + mb^2}{n}}\). Please find the value of \(k + m + n\).

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