Gravitational action for spacetimes with nonsmooth boundaries.