If $A$ is an effective divisor of $deg(A)=g-1$, then there exists an effective divisor $B$, of $deg(B)=g-1$, such that $A + B \sim K$, where $K$ is a canonical divisor.
I understand that $deg (A + B) = deg (K) = 2g-2$. But how to justify that $A + B \sim K$?
Thanks!