Implicit multigrid algorithm for the Navier-Stokes equations