For any positive integer $n$, let \( a_n = \sum_{k=1}^{\infty} \left\lfloor \frac{n+2^{k-1}}{2^k} \right\rfloor \), where \( \left\lfloor x \right\rfloor \) is the largest integer that is equal to or less than \( x \). Determine the value of \( a_{2015} \).

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