\[n_{\max}(m)=\left\lfloor\tfrac{256}{13}m-\tfrac{269}{52}\right\rfloor.\]