Pyramid \(OABCD\) has square base \(ABCD,\) congruent edges \(\overline{OA}, \overline{OB}, \overline{OC},\) and \(\overline{OD},\) and \(\angle AOB=45^\circ.\) Let \(\theta\) be the measure of the dihedral angle formed by faces \(OAB\) and \(OBC.\) Given that \(\cos \theta=m+\sqrt{n},\) where \(m_{}\) and \(n_{}\) are integers, find \(m+n.\)
(第十三届AIME1995 第12题)