Solution
= Solution
Let $M$ be a compact oriented surface with piecewise smooth, positively oriented boundary. If $\theta_j$ are the signed exterior turning angles at its corners, the global <Gauss-Bonnet theorem> with boundary is
$$
\boxed{
\int_M K\,dA
+\int_{\partial M}\kappa_g\,ds
+\sum_j\theta_j
=2\pi\chi(M)}.
$$
For a smooth boundary the corner sum is absent, and for a closed surface both boundary terms are absent.