Little Q likes online shopping very much. In the next $10^9$ days, there will be $n$ packages delivered to the post office in total. Let's label the next $10^9$ days as day 1, day 2, $\dots$, day $10^9$ respectively. For the $i$-th package, it will arrive at the post office at day $l_i$, and the deadline to take it back home is day $r_i$, which means Little Q can take it back home at day $x$ if and only if $l_i\leq x\leq r_i$.
Every time Little Q comes to the post office, he can take at most $k$ packages together back home at the same time. Note that Little Q can go to the post office multiple times during a single day. Please help Little Q determine how to take these $n$ packages back home such that the number of times he will go to the post office is minimized.