Background
I found an interesting unorthodox proof of the below. Let:
$$S(x) = \text{Sum of all distinct primes of $x$}$$
and $ S(1) = 0$
Then:
$$ \sum_{r=1}^L S(r) = \sum_{i=1}^\infty p_i \Big[ \frac{L}{p_i} \Big] \leq\pi(L) L $$
where $p_i$ is the $i$'th prime and $[y]$ is the greatest integer function, $\pi(y)$ is the number of primes less than or equal to $y$
Question
What would a normal proof of the same look like? Is there a better estimate (asymptotic allowed)?
Example
$$ \sum_{r=1}^6 S(r) = S(2) +S(3) +S(4) +S(5) +S(6) = 2+3+2+5+5 = 17$$
$$ \sum_{r=1}^6 S(r) =2 \Big[\frac{6}{2} \Big] + 3 \Big[\frac{6}{3} \Big]+ 5 \Big[\frac{6}{5} \Big ] = 17 \leq 18 $$