Total return paradox on ex date

i am facing the following conundrumm: When a stocks pays a dividend, the exchange substract the amount of the dividend from the price (this is adjusted price). Then the price return is negative ( equal to the pct of dividend paid). The total return would be the price return plus this exact dividend paid that would results in a total return of 0. then i don't understand how the total return could be different from 0 on ex date. thx