5000031 in words is written as :

Five Million Thirty One