The maths for half-life of drugs is identical to that for
radioactive decay.
Make a table of days against tablets and each day add up
the remaining levels for all drugs taken thus far. Thus, on the
$n$th day there will be the effect from $n$ tablets to add up. You
should do this numerically.