Let $D$ be a divisor on a $K3$ surface $S$. We have an exact sequence :
$\qquad\qquad\qquad\qquad\qquad0\longrightarrow\mathcal{O}_S(-D)\longrightarrow\mathcal{O}_S\longrightarrow\mathcal{O}_D\longrightarrow 0$.
We therefore get the long exact sequence $0\longrightarrow H^0(\mathcal{O}_S(-D))\longrightarrow H^0(\mathcal{O}_S)\longrightarrow H^0(\mathcal{O}_D)\longrightarrow H^1(\mathcal{O}_S(-D))\longrightarrow H^1(\mathcal{O}_S)\longrightarrow\cdots$.
Since $S$ is a $K3$ surface, we have $H^1(\mathcal{O}_S)=0$. Therefore, we get
$h^0(\mathcal{O}_S(-D))-h^0(\mathcal{O}_S)+h^0(\mathcal{O}_D)-h^1(\mathcal{O}_S(-D))=0$. We know that $h^0(\mathcal{O}_S)=1$. Therefore, we just need to prove that $h^0(\mathcal{O}_S(-D))=0$. Why is this true? I am not able to see it. Thanks in advance!
From the exact sequence$$0\longrightarrow\mathcal{O}_S(-D)\longrightarrow\mathcal{O}_S\longrightarrow\mathcal{O}_D\longrightarrow 0$$ we get that $h^0(\mathcal O_S(D))=1+h^0(\mathcal O_D(D)) >0.$ Now over a K3-surface, a line bundle $L$ is trivial if and only if $h^0(L)>0$ and $h^0(L^{-1})>0.$ Now assuming $D$ is non-trivial, by choosing $L=\mathcal O_S(-D),$ we get $h^0(\mathcal{O}_S(-D))=0.$