Morse inequalities for arbitrary smooth functions