PUMaC 2019 Number Theory B Problem 7

For a positive integer n, let f(n)=\sum_{i=1}^{n}\left\lfloor\log _{2} i\right\rfloor. Find the largest n<2018 such that n \mid f(n).