We are given some similar triangles.  Their areas are $1^2,3^2,5^2,\cdots,$ and $49^2$.  If the smallest triangle has a perimeter of $4$, what is the sum of all the triangles' perimeters?

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