Finite termination of the proximal point algorithm