The domain of the function $f(x)=\log_{\frac12}(\log_4(\log_{\frac14}(\log_{16}(\log_{\frac1{16}}x))))$ is an interval of length $\tfrac mn$, where $m$ and $n$ are relatively prime positive integers. What is $m+n$?
$\textbf{(A)}\ 19$ $\textbf{(B)}\ 31$ $\textbf{(C)}\ 271$ $\textbf{(D)}\ 319$ $\textbf{(E)}\ 511$