Total curvature and the isoperimetric inequality