Index of a singular point of a gradient vector field