If $d$ is a negative fundamental discriminant, then $$L(1,\chi_d)=\frac{\pi}{(2-\chi_d(2))\sqrt{-d}}\sum_{t=1}^{\lfloor -d/2\rfloor}\chi_d(t).$$ Here $\chi_d$ denotes the quadratic Dirichlet character $\left(\frac{d}{\cdot}\right)$. For a proof, see the proof of Theorem 3.9 in Section 10.3 of Rose: A course in number theory (2nd ed.). **Example.** For $d=-8$ the above formula gives that $$L(1,\chi_{-8})=\frac{\pi}{2\sqrt{8}}(1+0+1+0)=\frac{\pi}{2\sqrt{2}}.$$